Eclipse SWT: Standalone Java Apps on full OS speed!

The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alternative to the Abstract Window Toolkit (AWT) and Swing Java graphical user interface (GUI) toolkits provided by Sun Microsystems as part of the Java Platform, Standard Edition (J2SE). Both SWING and AWT  have always been criticized for their slowness. They actually ‘draw’ GUI components on screen pixel by pixel, which slows down the building up of screens.

SWT Mac
SWT Mac

This is different for SWT which accesses the native GUI libraries of the operating system using Java Native Interface (JNI) in a manner that is similar to those programs written using operating system-specific application programming interfaces (APIs). Programs that call SWT are portable, but the implementation of the toolkit, despite part of it being written in Java, is unique for each platform.

SWT Win
SWT Win

The results are Native Speed Applications for Mac, Windows
and Linux. Probably the best example is the SWT Webbrowser. An SWT example which is included in the Eclipse IDE and is used by Eclipse to show its help documents.

Thanks for reading this article. If you’re interested in the details of building SWT Applications see the next article .

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.