Java Reference
In-Depth Information
Sampling Swing Components
Swing provides a wide variety of components that you can explore by running the
SwingSet2
demo application, which you probably installed with the other demos
wheninstallingJDK7(see
Chapter1
forinstallationinstructions).Ifyoudidn'tinstall
the demos, rerun the JDK 7 installer and make sure that it's configured to install them.
To run
SwingSet2
, change to the JDK 7 home directory's
demo\jfc\SwingSet2
directory and execute
java -jar SwingSet2.jar
.
Figure7-12
revealsthatthisapplicationpresentsaGUIconsistingofamenu,atoolbar,
andatabbedworkspacethatletsyouswitchbetweeninteractingwithvariouscompon-
ent demos and viewing the current demo's source code.