9.5. Other Applet Methods

The built-in versions of the methods described in Section 9.4 don't actually do anything; they are simply placeholders for the user to override. Applet also contains a number of methods that perform common, useful tasks; the most frequently used ones are summarized below. Applet inherits from Panel, Container, and Component; full details of these classes are given in Chapter 13 (AWT Components).

public void add(Component c)

public void add(Component c, Object constraints)

public void add(String location, Component c)

public void add(PopupMenu menu)

These methods insert graphical components into the applet window. They are discussed in Chapter 13 (AWT Components) and Chapter 12 (Layout Managers).

public boolean contains(int ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.