Java Applets
The examples to the left assume an applet surface of 300 x 300 pixels. In practice, for a browser, the applet size, width and height, is specified in an applet tag in the web page, as follows:|
<applet code="MyApplet" WIDTH="300" HEIGHT="300"> <PARAM name="name1" value="value1"> <PARAM name="name2" value="value2"> </applet> |
The PARAM tags are explained in the 'getParameter()' program, listed to the left.
If the applet and/or its resources (images, for example) have been placed in a JAR file then the applet tag would contain a reference to the archive, as shown below
|
<applet code="MyApplet" archive="MyArchive.jar" WIDTH="300" HEIGHT="300"> <PARAM name="name1" value="value1"> <PARAM name="name2" value="value2"> </applet> |
The first examples to the left use simple basic graphics. For 2D graphics go to Graphics.
