Exercise 1: Editing the HTML File

In this lesson, you will edit the HTML file that Java WorkShop created for you when you ran the Blink project. You will specify an applet parameter and add a link to the source code. Once you edit the file, you will save it under a different file name so that your changes will not be overwritten the next time you run the project.

If you haven't yet created and built the Blink project, you should do so now using the instructions in Creating the Blink Project.

  1. Check the project manager for the name of the current project.
    If the current project is not Blink, double-click on the Blink project name.
  2. In the source editor, choose File -> Open.
    Java WorkShop opens a file chooser.
  3. Open the file Blink.tmp.html in your Blink directory.
    The file contains an applet tag that looks something like this:
     
    
    
    If your browser recognized the applet tag, you would see an applet here.

    Java WorkShop created this file when you ran the project. The information in this file is based on the information in the Run tab in the Edit Project window. If you have not previously run the project, see Running the Project.

  4. Choose File -> Save As from the Java WorkShop menu bar.
    The Save Current File dialog box is displayed.
  5. Select the Blink directory; then, type a new name for the HTML file and click OK.
    Be sure to rename the HTML file; otherwise your changes will be overwritten the next time you run the project. Also be sure you save the file in your Blink directory.
  6. In the source editor, change the value of height to 75.
  7. Add the following parameter before the lbl parameter to increase the speed at which the words blink:
    
    
  8. Add the following link to the source code after the tag:

    Source Code

    The path to the source code must be relative to the directory containing the HTML file.
  9. Click the Save button on the Edit/Debug toolbar.

    Next lesson:

    Exercise 2: Updating the Run Page