September 2005
Beginner
576 pages
13h 6m
English
The init() method of an applet automatically is handled once when the applet first starts to run. In this example, this method is used to assign values to the two arrays created for this applet, pageTitle and pageLink. It also is used to create a clickable button that will appear on the applet. The method consists of the following statements:
public void init() { pageTitle[0] = "Sun's Java site"; pageLink[0] = getURL("http://java.sun.com"); pageTitle[1] = "Cafe au Lait"; pageLink[1] = getURL("http://www.ibiblio.org/javafaq"); pageTitle[2] = "JavaWorld"; pageLink[2] = getURL("http://www.javaworld.com"); pageTitle[3] = "Java 2 in 24 Hours"; pageLink[3] = getURL("http://www.java24hours.com"); pageTitle[4] = "Sams Publishing"; ...Read now
Unlock full access