Trail: Deployment
Lesson: Applets
Section: Practical Considerations When Writing Applets
Creating a User Interface
Home Page > Deployment > Applets
Creating a User Interface
Most applets have a graphical user interface (GUI). This is a natural consequence of the fact that each applet appears within a browser window. Because the JApplet class is a subclass of the AppletPanel class and thus participates in the AWT event and drawing model, creating an applet's GUI is just as easy as creating an application's GUI — easier, actually, since the applet's window (the browser window) already exists.

In addition to its graphical UI, an applet can use several other UI types, depending on the kind of information it needs to give or get. Some applets play sounds, either to give the user feedback or to provide ambiance. Applets can get configuration information from the user through parameters that the applet defines. To give text information to the user, an applet can use its GUI, display a short status string (for text that's not crucial), or display to the standard output or standard error stream (for debugging purposes).

For information about sound, parameters, and status strings, see the Taking Advantage of the Applet API section. The rest of this section discusses the following topics, as they pertain to applets:

Previous page: Security Restrictions
Next page: Creating a GUI