Java in a Nutshell

Previous Chapter 15
Java-Related HTML Tags
Next
 

15.3 An Example HTML File

Example 15.1 shows an applet embedded in an HTML file. This file is a lightly edited version of one of the demos that ships with the JDK. Notice the use of the <PARAM> tags to supply arguments to the applet.

Example 15.1: Example HTML Page Containing an Applet

<HTML>
<HEAD>
<TITLE>The Animator Applet (1.1) - example 1</TITLE>
</HEAD>
<BODY>
<H1>The Animator Applet (1.1) - example 1</H1>
<APPLET CODE=Animator.class WIDTH=460 HEIGHT=160>
<PARAM NAME=imagesource VALUE="images/Beans">
<PARAM NAME=backgroundcolor VALUE="0xc0c0c0">
<PARAM NAME=endimage VALUE=10>
<PARAM NAME=soundsource VALUE="audio">
<PARAM NAME=soundtrack VALUE=spacemusic.au>
<PARAM NAME=sounds VALUE="1.au|2.au|3.au|4.au|5.au|6.au|7.au|8.au|9.au|0.au">
<PARAM NAME=pause VALUE=200>
</APPLET>
</BODY>
</HTML>


Previous Home Next
The <PARAM> Tag Book Index appletviewer

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java