HTML and CSS Reference
In-Depth Information
Table 11.6 Documentation for Fader26 applet
Parameter
Name
AppletHome
Parameter Value
http://www.crosswinds.net/∼fader
The name of the text file containing the message to be displayed; ( Note : each line in the text file
should begin with text= )
Data
This is the background color of the Java applet area; uses a hexadecimal color value
bgColor
Launch Notepad and create a Web page that invokes this applet. The beginning
XHTML is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Hands-On Practice 11.5</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Now you are ready to add the XHTML to place the Java applet on your Web page.
First, write the <applet> tag to reserve an area of the Web page that is 30 pixels high
and 610 pixels wide for the fader26.class applet. The code follows:
<applet code="fader26.class" height="30" width="610">
Next, create the parameter tags. The code for the parameter tags follows:
<param name="AppletHome" value="http://www.crosswinds.net/fader/" />
<param name="Data" value=“mymessage.txt" />
<param name="bgColor" value="#FFFFFF" />
Finally, an ending applet tag </applet>, ending body tag </body>, and ending
</html> tag are needed. The code shown in Notepad is displayed in Figure 11.14.
Figure 11.14
Sample Web page
code using the
fader26 Java applet
 
Search WWH ::




Custom Search