What should I choose SWT or Swing to program GUI in Java?

java, swing, swt, user-interface

Solution

Based on your requirements, I would say Swing. SWT has a more platform-specific look about it but Java ships with Swing built-in, there's no messing about with external libraries as with SWT although the use of Eclipse may make that much easier (I still develop quite a bit of my stuff from the command line unfortunately).

They're both easy in terms of use (well, easy once you get used to layout managers) and will work fine under both your desired platforms but since the only differentiator you seem to care about is the "without any additional tricks, settings and installations", I would stick with Swing.

That's my advice. Feel free to accept or ignore or even call me an old coot. I won't take offence :-)

Problem

I need to create a GUI application in Java. I just realized that I have different optional ways to go (SWT and Swing are among them). I have already found out that there is a lot of discussions about what way is better and I do not want to go to deep into these discussions (I am a newbie). I do not care about all aspects of the dilemma. I just have a few main requirements listed bellow: - It should be easy to use (easy to create what I want). - In the end I would like to have just one file which can be easily executed (without any additional tricks, settings and installations) like a standalone application. - It should be platform independent. Or more specifically, the application should work fine on Microsoft-Windows and Ubuntu (Linux).

Original source

Related problems