Exercise 1: Editing Run Attributes

The <applet> tag that you generated in the previous tutorial 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. Step-by-step instructions are in Creating a Project.

  1. Check the Java WorkShop tool bar for the name of the current portfolio and project.
    If the current portfolio is not "personal," choose Portfolio => Choose => personal. If the current project is not Blink, choose Project => Choose => Blink.

  2. Click the Project Manager control on the WorkShop tool bar.
    The Project Manager contains six tabs of information: General, Build, Debug/Browse, Run, Publish, and Portfolio. In this lesson, you will edit attributes in the Run tab.

  3. Click the Run tab.
    The attributes in this tab are used to generate the <applet> tag in the Blink.tmp.html file.

  4. Find the Parameters field (on the left side of the tab).
    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. Enter lbl in the Name field (to the right of the Parameters field).
    Note the lower case "ell" before and after "b."

  6. Enter the following text in the Value field:

    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 the Apply button to save the changes you have made.
    The words "Apply succeeded" appear in the lower-left corner of the browser.

  9. Click the Project Tester control on the WorkShop tool bar.
    The WorkShop includes the line
    <param name="lbl" value="Java WorkShop is really cool :-)">
    
    in the <applet> 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, load another page in the browser by clicking on any tool in the tool bar.

Next lesson:

Exercise 2: Editing Portfolio Attributes