New Java File Wizard

The New Java File Wizard creates a .java file.

To open the New Java File wizard, choose File|New to open the Object Gallery. Double-click the Class icon.

If a project is currently open, the New Java File Wizard displays. If no project is currently open, the Project Wizard steps you through creating a new project. Then, the New Java File Wizard is dipslayed.

The New Java File Wizard displays default values for the java file's package, class name, and file name.

This wizard contains the following fields:

Package

The package name derived from the project file. To assign a different package name to the new java 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" chapter for Getting Started 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.

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

File Name

The full path and .java file name for the java file. 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 the wizard. The file is created with the actual location and name indicated here.

Extends

The name of the class that this class extends. The default is java.lang.Object.

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, DecoratedFrame, BevelPanel, Dialog, or Applet.

Style

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

Public

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

Generate Parameterless Constructor

Generates an explicit parameterless constructor.

Generate Main Function

Generates a main function.

See also:
Getting Started: Requirements for a class to be visually designable