Basic HTML version of Foils prepared 20 Sept 97

Foil 13 <param> Tags and Applets

From Java Tutorial - Summer 1997 Part 1:Introduction to Java Language CEWES Tutorial, Classes SU/Jackson State -- July 22-25 and Fall 97. by Nancy J. McCracken,Geoffrey C. Fox


The applet tag can be followed by parameters:
  • <applet . . . >
  • <param name=attributename1 value="attributevalue1" >
  • .......
  • <param name=attributenameN value="attributevalueN" >
  • </applet>
The Java program accesses this information by
  • String attribute;
  • attribute = getParameter("attributename1");
  • if( attribute == null )
  • attribute = yourdefaultvalue;
    • // null is Java way of saying unset
Typically this processing would be in init() method of Applet



© on Sun Oct 12 1997