I am really confused over what to use. Options I see are awt, Swing and swt.
My question is which should be best for Desktop Java app on all platforms( Mac,Windows and Linux )with minimum platform dependent code ?
AWT is obsolete, though some of its classes and design form the underpinnings of the Swing API.
Here is my take on the differentiators between creating applications in Swing and SWT:
Swing
+ Forms part of the standard Java-SE platform, so fewer distribution headaches+ You can create a consistent look and feel across platforms+ Controls are lightweight, so creating your own is relatively easy- If you need Swing applications to look like native applications, there may be a lot of work in it; Swing can be styled with a platform look'n'feel, but the results aren't always close enough for everyone's satisfactionSWT
+ Easy to create simple applications which use native widgets- Manual resource management- You need to distribute platform-specific libraries- You face the lowest-common-denominator problem - not all widgets are available on all platforms, so some will be custom to SWT anywayAlthough I've put a lot more minuses against SWT, I wouldn't discount it. Which technology you pick will depend on your project requirements. Picking the library is only the beginning when it comes to UI development.
Swing is the easy, low-maintenance option and I'd agree with the other posters that this is probably the best fit for what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With