Creating new classes


In Forte for Java, Community Edition, you create new classes (as well as other objects) with templates. The template serves as a skeleton for the class and includes basic source code for that class. If you prefer to write all of the code yourself, you can choose the Empty template, and a file will be generated with the only code being the name of the package where you have created the template. A wide range of templates come with the IDE, and you can also create your own. For more on templates, see Using templates.

Classes are created using the New From Template wizard. You can access this wizard from the Main Window, the Explorer, and the Object Browser. When you access the wizard from the Main Window, you select the type of object you want to create from the first page of the wizard, which also provides short descriptions of each template. When you access the wizard from a contextual menu in the Explorer or the Object Browser, you skip straight to the second page of the wizard. In addition, the package information is automatically entered for you, based on where you right-clicked.

To create an object through the Main Window:
To create an object from the Explorer:
To create an object from the Object Browser:

Once you have created the class, the Editor window (or a tab in the Editor window if the Editor is already open) will open up and display the skeleton code for that class already generated. If the class you have created from the template is a visual form, the Form window and Component Inspector will also open. The new class will also be automatically added to the Explorer's tree and the Object Browser (see Guide to the Object Browser).

You can now edit your new class, either directly in the Editor window (see "Editing Java sources" below) or by using customizer dialog boxes to have the dialog generate various class elements, such as methods, constructors, and variables.

Note: Unlike other IDEs, the "project" is not the central paradigm for developing applications in Forte for Java. All objects developed in the IDE as well as any other file systems mounted in the IDE are all accessible from the Object Browser or from the Filesystems tab in the Explorer. However, it is also possible to organize files into projects to make it more convenient to compile or run them and to store different Project Settings for various applications. See Organizing work into projects.


Contents Prev Next Index