Swing
Swing is the primary user-interface toolkit in Java and is shipped with the standard Java SDK
Swt
SWT: The Standard Widget Toolkit is a user interface library for Java maintained by the Eclipse Foundation
Alternative eclipses portable
Example |
---|
"He only alternative swing has is swt eclipses toolkit however the only alternative swing s not portable as swing and not as flexible as well;the only alternative swing offers however faster performance and the use of native components which might be what some people actually want" from question Can we develop very good looking UI in swing and if not what are alternatives |
"We rely on swt for we java guis;yes you have to include an external native library but the look and feel is native more responsive although swing has become much faster in the past few years and seamless with other apps on the target platform" from question How do "professionals" make a GUI in java? |
Swing
Example |
---|
"By contrast swt actually uses the operating system s windows so naturally it has less memory usage and less work to do on its own;the windows in swing aren t really windows they re just made to look like windows" from question Is Java's Swing really a "memory hog"? |
"Addendum gilbert le blanc raises an excellent point about the ease portability of swing;in contrast swt requires slightly more effort to deploy but some users prefer the greater fidelity of org.eclipse.swt.widgets.filedialog as shown here" from question File Explorer using Java - how to go about it? |
Others
Example |
---|
I find swt to be an uglier api than swing in general though but not really a deal breaker from question A Java framework for online desktop application |
It is commonly argued on the internet that swt and jface are more suitable for quick out-of-the-box type ui development on the eclipse platform because swt and jface work so well together eg;jface wizards databinding and validation whereas swing is more suitable for enterprise level development in netbeans that requires more ui customising from question Swing or SWT/JFace - for integration with MS Office There are two serious contenders for a gui swing and swt;swing is more mature arguably is part of the standard jdk no deployment issues very flexible and well-documented;swt makes it easier to behave like a native application across different oses but this also means significantly more portability issues from question Java GUI libraries |
Give swt a go the api is a lot simpler than swing from question What to use for writing a user interface? |
Swing is the weaker of the gui technologies relating to accessibility in java compared to swt at any rate from question Hear text (screenreader) when mouse hovers over a JMenu object in Java / Windows |
I m not too eager for using swt though since i m more familiar with swing from question Rich client platforms versus JavaFX 2 versus Swing |
It can be hard to get the layuots exact the way you want in swt it s usually easier in swing from question Swing versus SWT |
Swt is claimed to be faster than swing although in modern versions swing is also fast enough from question What's the best Java framework for developing user interfaces? Is swt faster than swing from question Compare SWT with SWING |
In my opinion swing is easier to learn and to use but the results of swt are often nicer - you can often feel that a swing application behaves not completely right from question A layout implementation such as Eclipse |
In java if you want a graphic user interface you can use swt or swing and swing is better than swt from question JAVA GUI graphic design |
So in my view using swing is simply easier unless you have more experience in swt from question Developing a Standalone application with spring framework |
Swt community is smaller and it doesn t provide that many tools as swing does from question Current java desktop blueprint / state-of-art? |
However there are a few things that swt does that swing doesn t do as well or at all -- such as launch the system s native browser and execute javascript scripts in this browser;if you consider swt consider it carefully from question Qt Jambi vs SWT for cross-platform GUI development |
Even though i liked many design aspects of swt and it is simpler than swing imo swing is the one to learn because imo imo swing has far far better documentation examples etc from question How to separate program logic form design in swing and swt |
Fixing bugs in swt is much harder than in swing most classes in swt are final or contain hostile checks in the constructor to make sure no one extends them the package is signed so you can t simply replace classes and so far i tried several times to compile swt from sources - and failed from question Swing to SWT conversion: which disadvantages? |
If you re using swt have a look at this;unless explicitly otherwise stated in the javadocs swing components assuming you re talking about swing are not thread-safe from question How can i arrange gui and thread synchronization of gui component's state reading? |
Swt is more simple to use than swing especially if this is your first ui from question Which library better for faster java application swt or swing? |
This library also lets swing applications run unmodified using an swt backend since your program is already written using swt that doesn t help you but it will others from question Is there a nice way to abstract the GUI so SWT or Swing can be used? |
These two are completely different logically speaking and you should choose only one of t to go further with note that swt is more customizable and tries to combine the best from awt and swing while swing is more limited and uses the platform s native widgets from question SWT and Swing on mac |
Also swt is actually newer and more actively maintained than swing from question Swing vs JavaFx for desktop applications |
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 from question What should I choose SWT or Swing to program GUI in Java? |
Swt became slower than swing because it uses proxy to os widgets from question When Graphics2D.fill() can work 10 times slower in SWT? |
But in practice it all depends on swt and swing implementations on each platform;in my experience swt is faster in windows but it is not faster on mac os x from question Faster: SWT or Java2D? |
So if you are programming raw swing you get some support but still have to do a lot of work by yourself;swt asks for more basic effort and discipline from your side from question How to separate program logic form design in swing and swt |
This is usually problem of swing not swt swt is directly linked to os framework provided widgets - a quote from a gentle introduction to swt and jface 2;swt is a library that creates a java from question Beautifying a SWT application on Mac |