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. Use the ellipsis button to search for a base class that is not included in the drop-down list.

To open the Class wizard, choose File|New to launch the object gallery and double-click the Class icon on the New page.

Class Information

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 "Managing paths" chapter of Introducing 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 entered in the Class Javadoc fields in Step 3 of the Project wizard as header comments at the top of the file.

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2001</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */

Generate Default Constructor

Generates a default parameterless constructor.

Override Abstract Methods

Overrides all abstract methods.

See also