Java Reference
In-Depth Information
init() method
FIGURE 4-45
Compiling and Testing the init() Method
With the init() method complete, the applet will display its Labels,
TextField, and Checkboxes, allowing the user to click one Checkbox in the
CheckboxGroup. The following steps compile the applet and test the init()
method.
To Compile and Test the init() Method
1. With the Data Disk in drive A, compile the program by clicking Compile
Java on the Tools menu. If TextPad notifies you of errors, click
CommissionApplet.java in the Selector window, fix the errors, and then
compile again. When the program compiles with no errors, click Run
Java Applet on the Tools menu.
2. When the Choose File dialog box displays, if necessary, click the box
arrow and then click CommissionApplet.html in the list.
TextPad displays the Choose File dialog box (Figure 4-46).
Choose File
dialog box
HTML file
name
box arrow
Yes button
FIGURE 4-46
(continued)
 
Search WWH ::




Custom Search