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.
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.
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 .