Creating a New Form

The AWT (Abstract Window Toolkit) is the original Java class library for building Java GUIs. The AWT contains native code (code that refers to methods of a specific operating system or that is compiled for a specific processor). Swing forms use the newer Java Foundation Class (JFC) components for building GUIs that are implemented without native code.

The following table lists the basic types of form templates you can choose. Each differs in the design-time and runtime look of the form and in the code generated for the form's class.

Form Type Description
AWT Frame Top-level application window
AWT Dialog Modal or modeless window for collecting user input
AWT Applet Program run by a Java-enabled web browser or other applet viewer
AWT Panel Container for holding parts of an interface, which can in turn be used in any other container, such as a frame, panel, applet, or dialog box
Swing JFrame Top-level application window
Swing JDialog Modal or modeless window for collecting user input
Swing JApplet Program run by a Java-enabled web browser or other applet viewer
Swing JPanel Lightweight container for holding parts of an interface, which can in turn be used in any other container, such as a JFrame, JPanel, JApplet, or JDialog component
Swing JInternalFrame An internal frame that can be placed on a JDesktopPane component to create an MDI application

In addition to the basic form types listed above, you can also select from a few customized sample forms, such as a dialog box with OK and Cancel buttons.

See also
Form Editor

Templates

Creating a Multiple Document Interface (MDI) Application

Legal Notices