1.6 The Swing Set Demo


If you're in a hurry to see all the components Swing has to offer, be sure to check out the Swing Set demonstration. The demonstration is extremely easy to set up. If you have the 1.3 or 1.4 SDK, the demonstration is included. If you have 1.2, you must first download and extract the demo classes and add them to your classpath. Then follow these steps:

  1. Change the directory to the demo/jfc/SwingSet2 directory. (For the 1.2 release, the directory is demo/jfc/SwingSet.)

  2. Run the SwingSet2 (or SwingSet for 1.2) jar file:

    % java -jar SwingSet2.jar

You should immediately see a splash screen indicating that the Swing Set demo is loading. When it finishes, a window appears, similar to the one in Figure 1-9.

Figure 1-9. The Swing Set demo
figs/swng2.0109.gif

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 Metal L&F. In addition, some of the Swing creators have added "Easter eggs" throughout the Swing Set demo. See if you can find some!



Java Swing
Graphic Java 2: Mastering the Jfc, By Geary, 3Rd Edition, Volume 2: Swing
ISBN: 0130796670
EAN: 2147483647
Year: 2001
Pages: 289
Authors: David Geary

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net