Application Wizard
The Application Wizard creates an application consisting of two files and adds them to the existing project. (If no project is open, JBuilder runs the Project Wizard first before it runs the Application Wizard.)
The Application Wizard creates the following files:
- A startup class for your application, called 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.
- A UI class, called Frame1.java by default, that extends DecoratedFrame.
This class is your main UI container, to which you'll add UI components using the UI Designer. It uses BorderLayout for the DecoratedFrame, and contains a BevelPanel, in XYLayout, which is the drawing surface for your UI design. This class can also optionally contain a menu bar, a status bar, a toolbar, and an about box.
Step 1 of 2
Application Class
The wizard displays default names for the package and application class file.
- Package
- This field 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.
For more information on packages, see Packages in Creating and managing projects.
- Class
- This field displays the default name assigned to the application class. To rename it, click in the Class field and type in a new name.
- File
- The full path and .java file name for the application class is displayed here. This file path and name is constructed from the source path node under which the project exists, plus the contents of the Package and Class fields. This field is not editable. If the path or name are not correct, edit the Package and Class name fields on this page of the wizard. The file will be created with the actual location and name indicated here.
Application Style
- Generate header comments
- Check this to use information from the project file as header comments at the top of the application class file. This is the information entered in the Project Wizard when creating the project file.
//Title: Your Product Name
//Version:
//Copyright: Copyright (c) 1997
//Author: Your Name
//Company: Your Company
//Description:Your description
Step 2 of 2
Frame Class
This page controls the generation of the UI class for your application. This class is a subclass of DecoratedFrame.
- Class
- This field displays the default name assigned to the Frame class. To rename it, click in the Class field and type in a new name.
- File
- The full path and .java file name for the UI class is displayed here. This file path and name is constructed from the source path node under which the project exists, plus the contents of the Package and Class fields. This field is not editable. If the path or name are not correct, edit the Package and Class name fields on this page of the wizard. The file will be created with the actual location and name indicated here.
The full .java file name for the Frame file is displayed in this field which is not editable. If the name is not correct, edit the Package name in Step 1 and the Class name in Step 2.
Frame Style
- Title
- Displays default text for the Frame title bar. To change the title, click on the Title field and type in new text.
- Generate menu bar
- Check this to add a main Menu to the Frame. This menu contains the following:
- A File menu with an Exit MenuItem already coded to close the application when selected at runtime.
- A Help menu with an About MenuItem already coded to bring up an AboutBox Dialog when selected at runtime.
- Generate tool bar
- Check this to add a JBCL ButtonBar to your UI.
- Generate status bar
- Check this to add a JBCL StatusBar to your UI.
- Generate about box
- Check this to add an AboutBox Dialog class to the application.
- Center frame on screen
- Check this to center the application on the screen at runtime.