Class wizard

The Class wizard adds a new .java file to your project that extends either java.lang.Object, javax.swing.JComponent, or java.awt.Component.

To open the Class wizard, choose File|New to launch the object gallery and double-click the Class icon. It contains default values for the Java file's package, class name, and base class.

The Class wizard contains the following fields:

Package

The package name is derived from the project file name. To assign a different package name to the new Java file, click in the Package field and type a new name.

For more information on packages, see the "Packages" topic in the "Creating and managing projects" chapter of Building Applications with JBuilder.

Class Name

Displays the default name assigned to the class. To rename it, click in the Class Name field and type in a new name.

Important: In order for the class to be visually designable, the class name must match the file name.

Base Class

The name of the base class that this class extends. The default is java.lang.Object. Click the ellipsis button to search for a base class that is not included in this drop-down list.

If you want the class to be visually designable, the class must be a descendant of java.awt.Container. For example, it can extend Frame, Panel, Dialog, or Applet.

Options

Public

Makes the class public. The class must be public in order to be visually designable.

Generate Main Method

Generates a main() Method.

Generate Header Comments

Uses information from the project file as header comments at the top of the 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

Generate Default Constructor

Generates a default parameterless constructor.

Override Abstract Methods

Overrides all abstract methods.

See also: Requirements for a class to be visually designable