The Application wizard creates an application consisting of two files and adds them to the existing project. If a project isn't open, JBuilder runs the Project wizard first before running the Application wizard.
The Application wizard creates the following files:
Application1.java
by default. This class contains the main()
method for the application. At runtime, this startup class creates an instance of the UI class for the application.Frame1.java
by default, that extends JFrame
.
JPanel
, called contentPane
that uses BorderLayout
.
The second step of the wizard, the Frame Class Details page, gives you the options for the frame container to contain a menu bar, a status bar, or a toolbar. You can also choose to include an About Box dialog box and to center the application UI on the screen at runtime.
To open the Application wizard, choose File|New, then double-click the Application icon on the New page.
The wizard displays default names for the package and application class file.
Displays the package name derived from the project file. To assign a different package name to the application file, click in the Package field and type in a new name or choose an existing package name from the drop-down list.
For more information on packages, see the "Packages" topic in the "Managing paths" in Building Applications with JBuilder.
Displays the default name assigned to the application class. To rename it, click in the Class field and type in a new name.
Uses information entered in the Class Javadoc fields in Step 3 of the Project wizard as header comments at the top of the application class file.
/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2001</p> * <p>Company: </p> * @author unascribed * @version 1.0 */
This page controls the generation of the UI class for your application. This class is a subclass of JFrame
.
Displays the default name assigned to the Frame
class. To rename it, click in the Class field and type a new name.
Displays default text for the frame title bar. To change the title, click on the Title field and type new text.
Options for the frame container.
Adds a Swing main menu to the frame (JMenuBar
). This menu contains the following:
Adds a Swing toolbar (JToolbar
) to your UI with three default buttons. It also adds the .gif
images for these buttons to your project. You can remove these images from the project and add new ones using the Add To Project and Remove From Project buttons on project toolbar above the project pane. Use the Inspector in the UI designer to add more buttons and to specify which icon to use on each button. You must add the images you want to use for the toolbar buttons to your project before deploying your project.
Adds a status bar (JLabel
) to your UI.
Adds an AboutBox
to the application that extends JDialog
.
Centers the application on the screen at runtime.