Java Reference
In-Depth Information
Applet Viewer provides advantages over a browser for viewing an applet.
First, Applet Viewer ignores any HTML that is not immediately relevant to
launching an applet. If the HTML host document does not include a correct ref-
erence to an applet or similar object, Applet Viewer does nothing. Additionally,
Applet Viewer does not have to be Java-enabled, as do some browsers, in order to
correctly display the applet. Finally, Applet Viewer uses less memory than does a
browser, which makes it a good tool to test that the applet's code works properly
before attaching the applet to a Web page.
The following steps show how to run an applet using TextPad.
To Run an Applet
1. Click Tools on the TextPad menu bar.
The Tools menu is displayed (Figure 2-61).
Tools menu
Run Java Applet
command
FIGURE 2-61
2. Click Run Java Applet on the Tools menu. If necessary, click the drop-
down box arrow and click WelcomeApplet.html in the list.
The Choose File dialog box
is displayed (Figure 2-62).
Choose File
dialog box
WelcomeApplet.html
selected
Yes button
FIGURE 2-62
(continued)
 
Search WWH ::




Custom Search