wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes SWT and swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "SWT and swing" Watch "SWT and swing" New topic
Author

SWT and swing

sheng zhong
Greenhorn

Joined: Nov 23, 2006
Posts: 20
What's the difference of swt and swing?

When I edit a GUI java file, why there is a switch from swt to swing or swing to SWT?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18507
    
  40

Originally posted by sheng zhong:
What's the difference of swt and swing?

When I edit a GUI java file, why there is a switch from swt to swing or swing to SWT?


Swing/AWT is the GUI toolkit that is packaged with Java. AWT being the lower level library, and Swing the library that sits ontop of it. SWT is a alternate toolkit created by IBM -- and later open-sourced.

Many people prefer to use SWT, as it provides access to the native GUI libraries, whereas Swing emulates widgets via AWT which provides simple access to the native GUI library.

Personally, I don't have a preference as I am not a heavy GUI developer.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
jQuery in Action, 2nd edition
 
subject: SWT and swing
 
Similar Threads
small doubt in Swing appln using JPanel
Is SWT worth learning *instead of* Swing?
multicolumn TreeViewer with composite as content
Swing versus SWT
Image In Executable JAR