You can choose JFC/Swing templates, AWT (Abstract Window Toolkit) templates, sample pre-built application skeletons, or any class that is based on the JavaBeansTM component architecture.
![]() |
You should use only AWT components in AWT forms and only JFC/Swing components in JFC/Swing forms. It is possible to mix AWT and JFC/Swing components in one form, but doing so can cause repaint problems at both design time and run time. |
After you complete the steps of the New wizard, a blank form of the selected type is created and two tabs open in the Source Editor:
Templates that start with J are JFC/Swing form templates, which use the latest Java Foundation Classes/Swing (JFC/Swing) components for building GUIs without native code. Native code is code that refers to methods of a specific operating system or that is compiled for a specific processor. The AWT is the original Java class library for building Java GUIs. The AWT contains native code.
The following table lists the types of form templates you can choose. Each differs in the design time and run time look of the form and in the code generated for the form's class.
Form Type | Description |
---|---|
JFC/Swing JApplet | Program run by a Java enabled web browser or other applet viewer. |
JFC/Swing JDialog | Modal or modeless window for collecting user input. |
JFC/Swing JFrame | Top-level application window. |
JFC/Swing JInternalFrame | An internal frame that can be placed on a JDesktopPane component to create an MDI application. |
JFC/Swing JPanel | Lightweight container for holding parts of an interface. In turn, the container can be used in any other container, such as a JFrame, JPanel, JApplet, or JDialog component. |
Bean Form |
Template to create a new form based on any JavaBeans component you that specify. The new form can be visual or nonvisual. Specify the class in the Superclass field in the Basic Class Definition page (step 3) of the New wizard. The JavaBean class that you specify when creating the new form must be in the classpath (mounted in the IDE) and must be already compiled. A bean is any class that complies with the JavaBeans component architecture. A bean must have a public constructor without parameters. Use any JFC/Swing component as an example of a JavaBeans class. For example, you can use javax.swing.JButton to create a form that will produce a customized button. Using this template, you can also create a plain container for holding beans by specifying java.lang.Object as the superclass. |
AWT Forms | Visual forms that are based on the AWT. The AWT forms include Applet, Dialog, Frame, and Panel. |
Sample Forms | Customized sample forms that include a JFrame-based application with three menus, a JFrame application that can be used as the main window for an MDI application, and a dialog box with OK and Cancel buttons. |
See Also | |
---|---|
Form Editor
Templates Creating a Multiple Document Interface (MDI) Application |