The Standard Widget Toolkit (SWT) is a Java class library that allows you to
create native user interfaces. It's designed to provide efficient, portable
access to the underlying facilities of the operating system on which it's
implemented. SWT uses native widgets wherever possible, giving an SWT program
a native look and feel and a high level of integration with the desktop. In
addition, SWT includes a rich set of controls such as tree, table, and tab
folder. This article introduces SWT by describing some of the basic concepts
and classes.
Hello World: A Simple SWT Program
The easiest way to learn SWT is to study a simple example. The following code
shows a complete SWT program that creates and displays a new window on the
desktop with "Hello World" in the title bar. Fig... (more)
The first part of this article (JDJ, Vol. 8, issue 4) introduced the Standard
Widget Toolkit (SWT), and showed how graphical user interfaces can be created
using some of the basic widgets found in SWT. In addition, layout classes
were described that allow widgets to be arbitrarily positioned and sized
within their parent.
In Part 2, we continue where the previous article left off, describ... (more)