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.
To open the Application Wizard, choose File|New, then double-click the Application icon.
The Application Wizard consists of two pages:
Step 1 of 2
Application Class
The wizard displays default names for the package and application class file.
Package
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 the Packages topic in the "Creating and managing projects" of Getting Started with JBuilder.
Class
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. 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 location and name indicated here.
Application Style
Use only core JDK and Swing classes
Restricts auto-generated code to the JDK and Swing classes.
Generate header comments
Uses 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
This page controls the generation of the UI class for your application. This class is a subclass of DecoratedFrame.
Frame Class
Class
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. 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 Name fields. This field is not editable. If the path or name are not correct, edit the Class field on this page of the wizard. The file will be created with the actual location and name indicated here.
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
Adds either a JBCL or Swing main menu to the Frame. This menu contains the following:
- A File menu with an Exit menu item already coded to close the application when selected at runtime.
- A Help menu with an About menu item already coded to bring up an About dialog box when selected at runtime.
Generate toolbar
Adds either a JBCL ButtonBar or a Swing 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 the AppBrowser. Use the Inspector to add more buttons and to specify which button 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.
Generate status bar
Adds a JBCL StatusBar or a Swing JLabel to your UI.
Generate status bar
Adds a JBCL StatusBar or a Swing JLabel to your UI.
Generate About box
Adds an AboutBox Dialog class to the application.
Center frame on screen
Centers the application on the screen at runtime.