We developed this book with one primary goal in mind: to introduce the SWT and JFace toolsets as simply and as thoroughly as possible. Although the available documentation covers many aspects of the two libraries, we were disappointed by the amount (particularly in graphics) that has gone undocumented. So, we came together in late 2003 to create an approachable book that covers both the high-level theory and the low-level details of the combined SWT/JFace development tools.
Thanks to the hard work of the folks at eclipse.org, SWT and JFace have recently received quite a bit of attention and debate within the Java community. Most of this discussion has focused on the relative merits of Swing as a standard component of the Java 2 platform, versus SWT as a nonstandard library that uses native code—an approach foreign to the “write once run anywhere” mantra embraced by most Java developers. Although Swing has many strengths, we believe that SWT and JFace together provide a compelling alternative for developing the user interface of many types of applications.
We wrote this book not only for Swing developers but also for new Java users who want to build applications that reach beyond the command line. Toward this end, we present code samples and also do our best to explain the general theories behind graphical user interface construction. In particular, we’ve gone into great depth concerning the Model-View-Controller paradigm, which greatly improves both the reliability and maintainability of graphical applications.
Our goal is to share our SWT experience with you, help you decide if SWT and JFace make sense for your project, and help you to make effective use of these technologies.