December 2002
Intermediate to advanced
1050 pages
24h 49m
English
The following program demonstrates some of the basics of programming with Swing and highlights some of the interesting features of the GUI, such as being able outchange the look and feel of the GUI programmatically. This program generates the window shown in Figure 30-5.

The code for the SwingGUIDemo class is shown in the listing below. The SwingGUIDemo class extends JFrame, allowing us to call JFrame methods directly as instance methods. The application manages the placement of components using the default layout manager for the JFrame the BorderLayout layout manager. In ...
Read now
Unlock full access