The Swing Set Demo
If you’re in a hurry to see all the components that Swing has to offer, be sure to check out the Swing Set demonstration provided with the standalone Swing distribution. The demonstration is extremely easy to set up. Assuming you’re using JDK 1.1, after downloading and extracting the Swing classes on your computer, you will need to the following:
Edit your
CLASSPATHenvironment variable to include the fileswingall.jar, which resides in the base directory of the distribution. Also, set theSWING_HOMEenvironment variable to point to the base directory.Change directory to the
examples/SwingSetdirectory in the Swing distribution.Execute the
runnitscript orrunnit.batfile, depending on your platform.[7]
If you are using JDK 1.2, just find the directory
demo/SwingSet (unfortunately, it has moved
around in different pre-releases) and type java SwingSet. You should immediately see a progress bar
indicating that the Swing Set demo is loading. When it finishes, a
window appears, similar to the one in Figure 1.8.

Figure 1-8. The Swing Set demo
This demo contains a series of tabs that demonstrate almost all of the components in the Swing libraries. Be sure to check out the internal frames demo and the new Metal look-and-feel. In addition, some of the Swing creators have added “Easter eggs” of their own throughout the Swing Set demo. See if you can find some!
[7] If this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access