Starting with init()
The init() method of an applet automatically is handled once when the applet first starts to run. This method is used to assign values to the arrays pageTitle and pageLink. It also is used to create a clickable button that appears on the applet. The method consists of the following statements:
public void init() { pageTitle = new String[] { "Sun's Java site", "Cafe au Lait", "JavaWorld", "Java in 24 Hours", "Sams Publishing", "Workbench" }; pageLink[0] = getURL("http://java.sun.com"); pageLink[1] = getURL("http://www.ibiblio.org/javafaq"); pageLink[2] = getURL("http://www.javaworld.com"); pageLink[3] = getURL("http://www.java24hours.com"); pageLink[4] = getURL( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access