File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes SWT or AWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "SWT or AWT" Watch "SWT or AWT" New topic


Volker Schnitzer

Joined: Jan 07, 2004
Posts: 11
One reader on who gives his feedback laments that SWT is not covered. He preferred SWT over AWT. I am not yet an advanced mobile application developer. What exactly is the difference between SWT and AWT, and why is SWT better, or is this a matter of opinion?

Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Here I got some tips for u about the advantages of Swing... Hope it might be useful for u...

What is SwingWT?
SwingWT is a 100% pure Java library which very closely resembles the interface of Swing and AWT. The difference is that instead of using the Swing/AWT libraries, it drives native peer widgets from SWT.
This offers many benefits:
-More responsive GUIs and faster startup times
-Less RAM usage for applications
-Many developers prefer the Swing API
-Existing Swing applications don't need to be recoded
-Mature Swing UI designers can be used
-Developers deploying to *nix/Win32 can compile natively with GCJ and the applications can be distributed without a VM. Linux distribution makers could package many existing Java/Swing applications that previously could not be distributed in workable state.
-SWT components can be directly accessed through the API, allowing mix and match (make Eclipse plugins with Swing!)
-Use Swing on mobile devices!
-The best of both worlds! New Swing components for JClosableTabbedPane, JCoolBar..

Co-author of SCMAD Exam Guide, Author of JMADPlus
Michael Yuan
Ranch Hand

Joined: Mar 07, 2002
Posts: 1427
This is one of biggest religious war in the Java world. Basically:
AWT and Swing are JCP standards and officially part of the JDK for UI development. AWT is also available on all Java powered PDAs.
SWT is IBM's Java UI package. It is tightly integrated with the native OS and hence provides better performance and look-and-feel. But it is not as portable as AWT/Swing.
IBM produces a Java runtime on PDAs. They support SWT and on top of that, the standard AWT. I do not cover SWT since it is not universal and my book is not about the UI anyway.

Seam Framework:
I agree. Here's the link:
subject: SWT or AWT
It's not a secret anymore!