Trail: Deployment
Lesson: Applets
Taking Advantage of the Applet API
Taking Advantage of the Applet API

The applet API lets you take advantage of the close relationship that applets have with Web browsers. The API is provided by the javax.swing.JApplet class and the java.applet.AppletContext interface.

Applets can use these APIs to do the following:

This section discusses each of these topics in turn, except for the milestone methods (init, start, and so on), which are explained in the Methods for Milestones section. For information about how to use non-applet-specific APIs in an applet, see the Practical Considerations When Writing Applets section.

Finding and Loading Data Files

This section describes how to load your applet's data files, such as images.

Displaying Short Status Strings

This section describes how to make an applet display a string on the status line of the application in which it is running.

Displaying Documents in the Browser

This section tells you how to use the two showDocument methods to request that the browser visit a particular URL.

Sending Messages to Other Applets

This section provides details and example applets that communicate with each other.

Playing Sounds

The AudioClip interface provides support for playing sounds in applets, as explained and demonstrated in this section.

Defining and Using Applet Parameters

This section describes how to decide which parameters to provide, how to implement them, and how to inform the user about them.

Using the APPLET Tag

This section tells you how to customize an applet by editing its HTML tag.
Previous page: What Applets Can and Can't Do
Next page: Finding and Loading Data Files