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 General page.
The wizard displays default names for the package and application class file.
Displays the package name derived from the project file. There are several ways to assign a different package name to the application file:
For more information on packages, see the "Packages" topic in "Managing paths" in Introducing 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) 2002</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.
JBuilder Personal can have only one runtime configuration.
This step allows you to create a new runtime configuration to use for running the application. See "Setting runtime configurations" in Building Applications with JBuilder.
Indicates whether to create a new runtime configuration for running the application. If no configurations of this type exist yet for this project, this option is checked by default. Otherwise, it is unchecked by default.
Indicates the name for the new runtime configuration. The default name is the application name. This field is only enabled if Create A Runtime Configuration is checked.
Presents a list of other runtime configurations of the same type in the project from which you can choose to use as a template for creating this runtime configuration. his field is only enabled if Create A Runtime Configuration is checked.