# Creating an Applet Project

You can create an applet project in any portfolio for which you have write permission. When you create an applet, you must provide a project name and the directory where your files will reside. Java WorkShop supplies default values for all other project attributes.

To create an applet project:

1. Click the Project's button on the Java WorkShop main toolbar.
2. Select the portfolio name where you want the applet project to be placed and choose File -> Open Portfolio.
3. In the project manager, choose File -> New -> Project.
   The Create Project wizard is displayed.
4. Type the name of your project in the box where `untitled` appears.
   Make sure you are consistent in the use of capitalization in project and file names (even if you are working on Microsoft Windows NT or Windows 95, where file names are not case-sensitive). Java WorkShop is case-sensitive.
5. Make sure that the Applet radio button is selected.
6. Decide whether your applet will have a GUI. Complete the creation of your project by finishing one of the following sections:
   - To create your applet using the Visual Java GUI builder:
     1. Make sure the radio button for creating the GUI using the Visual Java GUI Builder is selected.
     2. Click Next.
     3. In the text box where Java WorkShop displays the default path name, type the path name of the directory where you want to keep the project.
        If the directory does not exist, Java WorkShop will create it.
     4. Decide whether you want to add existing source files for the applet:
        - If you do not want to add existing source files for the applet, make sure the No radio button is selected. Skip to step 10.
        - If you do want to add existing source files for the applet, click the Yes radio button.
     5. Click Next.
     6. Click either the Add All in Directory or Add button to add source files to the list of project files.
     7. Click Next.
     8. If you want a name other than the default class file name, type the new name in the Applet Class box.
     9. Click Next.
     10. If you want Java WorkShop to create an HTML file automatically, make sure the Use generated html page radio button is selected.
         Otherwise, use your own html page by selecting the Use custom html page radio button.
     11. Click Finish.
   - To create your applet without using the Visual Java GUI builder, or to create an applet without a GUI:
     1. Click the radio button for your project's type of interface.
        To create a GUI applet without using the GUI builder, select The GUI will be created manually. To create an applet without a GUI, select No GUI.
     2. Click Next.
     3. In the text box where Java WorkShop displays the default path name, type the path name of the directory where you want to keep the project.
        If the directory does not exist, Java WorkShop will create it.
     4. Decide whether you want to add existing source files for the applet:
        - If you do not want to add existing source files for the applet, make sure the No radio button is selected. Skip to step 6.
        - If you do want to add existing source files for the applet, click the Yes radio button.
     5. Click Next.
     6. If you want Java WorkShop to create an HTML file automatically, make sure the Use generated html page radio button is selected.
        Otherwise, use your own html page by selecting the Use custom html page radio button.
     7. Click Finish.

Java WorkShop creates the project `.prj` file using the name, source file names, and other information you supplied, and stores the project in the specified directory. The project name is added to the Project Manager window.

If you are creating a new source file, a new project template is displayed in the source editor. If you indicated in the Create Project wizard that there are existing source files, the source editor supplies the existing source files. If you chose to use the Visual Java GUI builder, the GUI builder palette is displayed.

You can change the default attribute values for the project by choosing Edit -> Project. These attributes define the project's individual characteristics, such as the options to use to build the project. For a listing of all project attributes, see Editing Project Attributes.

See also:

  Creating a Standalone Program Project
  Creating a Java Package Project
  Creating a Beans Project
  Using the Create Project Wizard