Search VisualAge for Java Information Go to Information Home Page Go to VisualAge for Java WWW Site

Create Class

The Add Class SmartGuide lets you create a new class or add an existing one from the repository. 

To create an new class:

  1. In the Project field, provide the name of a project to contain the new class. This can be a new name, in which case the SmartGuide creates the project before it creates the class. Alternatively, you can select an existing project. Click Browse to choose from a list of projects in the workspace.
  2. Likewise provide a new or existing package name for the class in the Package field.
  3. Select the Create a new class radio button.
  4. Enter a name for the class.
  5. Specify a super class (the class the new one extends).  If you selected a class in the workspace before you started the SmartGuide, it will be inserted here by default.   Click Browse to select from a list of all classes in the workspace.  The new class will extend java.lang.Object if no other class is specified.
  6. If you want to open a class browser on the class once it has been generated, enable the Browse class when finished check box.
  7. If you want to use the Visual Composition Editor to create a visual class, enable the Compose the class visually check box.
  8. Click Next to specify more options, including import statements, interfaces, access modifiers, and generated method stubs, or click Finish.

To add a class from the repository:

  1. In the Project field, provide the name of an existing project to contain the class. Click Browse to choose from a list of projects in the workspace.
  2. Likewise provide an existing package name for the class in the Package field.
  3. Select the Add classes from the repository radio button.
  4. The Available classes list shows the classes that are available for the project and package.  Select one by enabling its check box.  Note: Only those classes that were created for the selected package can be added back to the package.
  5. The Available editions list shows the editions of the selected class in the repository.  Select one by enabling its check box. 
  6. If needed, select more than one class to add to the workspace by repeating the two previous steps.
  7. Click Finish.