14.1. Getting Started with Swing

Swing is standard in the Java 2 Platform but can be added to JDK 1.1 as a separate package. The JDK 1.1 version of Swing is downloadable from http://java.sun.com/products/jfc/download.html. You can also use Swing in an applet, but unless you are using Netscape 6, you will need to install the Java Plug-In (covered in Section 9.9).

Differences Between Swing and the AWT

The following subsections summarize the basic differences between Swing and the AWT.

Naming Convention

All Swing component names begin with a capital J and follow the format JXxx, where the Xxx represents a common component name, for example, JFrame, JPanel, JApplet, JDialog, JButton. All the AWT components have an almost equivalent Swing component. ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.