Adding a Form to a Project

See Also   Tasks

During application development, you typically add many forms to define a user interface.

To add a form

  1. Open an existing project, or create a new project.

  2. In Project Explorer, select the name of your project.

  3. On the Project menu, click Add Form.

  4. In the Add Item dialog box, click either the New or Existing tab.

    For this example, click the New tab.

  5. In the Add Item dialog box, click the Form icon.

    This template creates an instance of a form in your project.

  6. In the Name box, edit the name of the class file.

    The default name is Form1.java.

  7. Click Open.

    The design surface is displayed, showing the new form.

Viewing a Form

A form can be displayed in either the Text editor, so you can edit the form's underlying code, or in the Forms Designer so you can edit the form graphically.

To view a form in the Forms Designer