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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.