This section of the course notes is meant to answer a few of the most common questions about the Java Foundation Classes (JFC) and Swing. In doing so, we will provide you with an overview of each of them, including their structure and possible ways to approach building a JFC/Swing based Graphical User Interface (GUI).
As stated above, the JFC contains various features related to GUI development. Here is a listing of its contents:
It should be noted that the Swing API comes in two forms. The first form, which is a standard part of the Java 2 platform (Java Development Kit (JDK) v1.2 and v1.3), is the form that we will be using in the labs. If you wish to download a copy of the JDK for your home machine and for some reason you are unable to get your hands on a Java 2 release, the Swing API is available for JDK v1.1 as an additional package of libraries named JFC 1.1.
The Swing API is a large collection of classes to say the least, and the JFC is even larger. But what
packages will we be using to power our GUIs? As it turns out, we will really only need four packages
Since you already know how to compile and run regular Java applications and applets, you already know how to compile and run applications and applets that use Swing features. It is because the Swing packages are incorporated as part of the Java 2 platform that things are so simple. All you have to do is be sure to import the appropriate Swing package(s) at the beginning of your program. In any case, the remainder of this tutorial assumes that you are already comfortable with compiling and running Java applications and applets.
Graphical User Interface Concepts
Components
Back to the introduction
Copyright (C) 2000 - 2002, The University of British Columbia