Exercise 1: Editing Run Attributes

The tag that you generated in Tutorial One, specifies the minimum requirements to place the applet on a web page. In this exercise, you will add parameters that let you customize how the applet is displayed.

This exercise works with the Blink 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 project manager, choose Project -> Edit.
    The Edit Project window displays four tabs: General, Build, Debug/Browse, and Run.
  3. Click the Run tab.
    The attributes in this tab are used to generate the tag in the Blink.tmp.html file.
  4. Find the Parameters field (about halfway down the window).
    Currently, no parameters are defined for the applet. A parameter is a nonstandard attribute that defines how the applet is displayed. A parameter has a name and a value. You will add a parameter to change the words in the blinking text.
  5. Type lbl (an abbreviation for "label"), in the Name text box to the right of the Parameters field.
  6. Type the following text in the Value box:
    Java WorkShop is really cool :-)
  7. Click the Add button.
    The line lbl=Java WorkShop is really cool :-) appears in the Parameters field.
  8. Click OK to save the changes you have made.
  9. Click the Run button on the Java WorkShop main toolbar.
    Java WorkShop includes the line:
    
    
    in the tag in the Blink.tmp.html file. The file is loaded into the browser, and you now see the words "Java WorkShop is really cool :-)" blinking in different colors.

    To stop the running applet, choose Applet -> Quit in the Applet Viewer window.

    Next lesson:

    Exercise 2: Editing Build Attributes