View Full Version : [SOLVED] swing or swt

April 29th, 2010, 04:04 AM
I didn't really know very much about swt until recently, so I have been using swing for a program that I am making, but I have been reading some stuff about swt which makes me think that it is better than swing, but before I rewrite large portions of the code, in your opinions, which is better swing or swt?

April 29th, 2010, 01:11 PM
by swt you mena awt? thats the other gui library for java.

the diffrence is that swing will inherit the look and feel of the of you are on, so if you take your app to another OS it will look like a native program.. all well and good, but awt is for custom, where swing inherits aesthetics from the os, awt is good if we want to create our own "look"

April 29th, 2010, 05:20 PM
by swt you mena awt? thats the other gui library for java.

Nope, I mean this one http://www.eclipse.org/swt/

April 29th, 2010, 11:06 PM
Of course Swing.
SWT has been picked up by IBM in the early days when Swing was painfully slow. Now there's no serious reason to use SWT any longer because:
1) Swing comes bundled with Java and SWT does not, hence the mere download size of the SWT version is bigger by about 2MB, for example for an applet it's probably too much of an overhead.
2) Trust me, SWT is buggier
3) With SWT you automatically create a lot of problems for yourself by having to create different builds of your app with custom SWT for every platform and architecture, plust having to write platform specific startup files for Java to find SWT.
4) With Swing you have more control over your widgets, over how they're painted because Swing is painted directly by Java while SWT is not.
5) The list goes on...

April 30th, 2010, 12:25 AM
Swing it baby!

April 30th, 2010, 04:45 AM
Ah ok, I guess I'll stay away from swt then :P

April 30th, 2010, 05:24 AM