< Zurück | Inhalt | Weiter >

Chapter 17


Other Ways: Alternatives to Swing


image

In which we discover that Swing is not the only GUI game in town. In so doing we learn the rudiments of the Standard Widget Toolkit and we describe some of the key limitations of this alternative toolkit.

image



17.1 WHAT YOU WILL LEARN


This chapter will introduce the basic classes of SWT, the Standard Widget Toolkit, which is an alternative GUI library developed mainly for the Eclipse Java IDE.1 Development of Eclipse has been led primarily by IBM.2



image

1. http://www.eclipse.org/

2. http://www.ibm.com/


377


17.2 THE IBM SWT TOOLKIT


The Standard Widget Toolkit is a complete GUI library for Java, completely independent of Swing and AWT. It is implemented as a library of native methods, so it cannot be ported to any Java runtime unless that platform has the native part of the SWT library implemented for it.


 


17.2.1 Another GUI Toolkit. Why?

17.2.2 Duplicated Effort. Why Cover It?

17.2.3 Portability: Better and Worse

17.2.4 The Rest of the Chapter

17.2.5 SWT: Close to the Metal

17.2.6 “Hello, world” SWT Style

17.3.1 Step 1: Convert the Class Members

17.3.2 Step 2: Converting the main() Method

Methods

17.3.4 Completing the Conversion of the BudgetPro Class

17.3.5 Completing the Conversion of the Application

17.3.6 Closing Thoughts