The Eclipse frameworks provide a Java alternative to building robust, responsive, and great-looking desktop applications. In this excerpt from Enterprise Java Development on a Budget, authors Brian Sam-Bodden and Christopher Judd introduce Eclipse's SWT (Simple Widget Toolkit) and JFace frameworks. In their discussion, they illustrate how to build a GUI application using both APIs. (5,000 words; April 26, 2004)
The Standard Widget Toolkit (SWT) is the open source windowing toolkit that drives Eclipse. Written in Java with JNI (Java Native Interface) classes calling native windowing APIs, SWT lets you write native GUI applications using Java. Unlike Java AWT (Abstract Window Toolkit), it lacks the "peer" layer that prevents AWT from taking advantage of a full range of widgets. Unlike Java Swing, SWT does not perform all painting operations within its own library. For this reason, SWT looks like any native windowing application, and the performance is excellent. In this article, Gervase Gallant looks at a common use of window applications-to present rows and columns of database tables. The first data entry screen he presents is a simple data table that allows a user to view and select a row for editing. In the second screen, the author deals with the issue of updating multiple text and button fields bound to a single row of data. (3,000 words; May 31, 2004)