Exercise 1: Creating the Blink Project

This exercise shows you how to create an applet project--a Java program designed to run within a web browser. The project you will create, Blink, is a small applet that blinks text on and off, in different colors. You create the project using an existing source file, Blink.java, that was installed in your Blink directory.
  1. Click the Projects button on the Java WorkShop main toolbar.
    The Java WorkShop Project Manager window is displayed.
  2. Check the project manager for the name of the current portfolio--the current portfolio name is shown in blue text.
    If the current portfolio is not personal, double-click on the personal portfolio name. If you do not have a personal portfolio, see Adding Your Personal Portfolio.
  3. Choose File -> New -> Project (be sure to go to the File menu in the project manager window).
    The Create Project wizard opens.
  4. Select untitled and type Blink in the project name box.
    Make sure you capitalize the "B" in Blink. Java is case-sensitive. The project name Blink is consistent with the source file name Blink.java, which follows the Java convention of initial capitalization.
  5. Click the Applet radio button for the application type.
  6. Click the No GUI radio button.
    This project will not have a graphical user interface.
  7. Click Next.
  8. You should save the Blink project in the default directory.
  9. Click Yes, to add existing Java files to the Blink project.
  10. Click Next.
  11. Click the Add All in Directory button (under the Project Files list).
    The file name Blink.java appears in the Project Files list.
  12. Click Next.
    In the Applet Class box, Blink, is entered by Java WorkShop. The main class file is the .class file that extends the Applet class of the Java library.
  13. Click Next.
  14. You should use the html page generated by Java WorkShop.
  15. Click Finish.
    The source editor window displays the Blink.java source file with its name appearing in the Java WorkShop title bar. In the project manager, your personal portfolio displays the Blink project as the current project. The current project sets the context for all tools in Java WorkShop.

    In this example, you created the Blink project in the file Blink.prj in your Blink directory. When you create a project in the future, you can create it in any directory in your file system.

Next lesson:

Exercise 2: Building the Project