Home

 

Standard Widget Toolkit

The Standard Widget1 Toolkit (SWT) is the GUI toolkit provided as part of the Eclipse Project and used to build the Eclipse GUI itself. The SWT is written entirely in Java and uses the Java Native Interface (JNI™) to pass the calls through to the operating system where possible. This is done to avoid the lowest common denominator problem. The SWT uses native calls where they are available and builds the component in Java where they are not.

In many respects, the SWT provides the best of both worlds (AWT and Swing):

It has a rich, portable component model, like Swing.

It has the same look-and-feel as the native operating system, like the AWT.

GUIs built using the SWT perform well, like the AWT, because most of the components simply pass through to operating system components.

A disadvantage of the SWT is that, unlike the AWT and Swing, it is not a standard part of Java SE V6.0. Consequently, any application that uses the SWT has to be installed along with the SWT class libraries. However, the SWT, like the rest of the components that make up Eclipse, is open source and freely distributable under the terms of the Common Public License.

More information about the SWT can be found at:

http://www.eclipse.org/swt/

Another popular technology based on SWT and Eclipse is the Eclipse Rich Client Platform (RCP). The architecture of Eclipse allows that its components can be used to create any kind of client applications.

More information about Eclipse RCP can be found here:

http://wiki.eclipse.org/index.php/Rich_Client_Platform

1In the context of windowing systems, a widget is a reusable interface component, such as a menu, scroll bar, button, text box, or label.

ibm.com/redbooks