| Table of Contents

# Creating an Applet User Interface

> Most applets have a graphical user interface (GUI). This is a natural consequence of the fact that each applet appears, as specified by the `<APPLET>` tag, within an HTML page that's displayed by a browser. Because the `Applet` class is a subclass of the AWT (Abstract Window Toolkit) `Panel` 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.

> An applet can mix and match several 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. Applets can get system information by reading system properties. To give text information to the user, an applet can use its GUI or display a short status string (for text that's not crucial) or display to the standard output or standard error stream (for debugging text).

> Some of the UI possibilities mentioned above are available only to applets. Some are available to applications, as well. This lesson gives you everything you need to know to use each UI type in an applet, with pointers to where you can learn more about each option that is not specific to applets.

> #### Creating a GUI

> > Applets use the AWT to create their GUIs. Go to this section to learn about the very few issues that apply only to applets that use the AWT.

> #### Playing Sounds

> > The `Applet` class and `AudioClip` interface provide support for playing sounds.

> #### Defining and Using Applet Parameters

> > You can improve the versatility of your applet by providing parameters. This section describes how to decide which parameters to provide, how to implement them, and how to inform the user about them.

> #### Reading System Properties

> > Applets can read some, but not all, system properties. This section discusses which system properties applets can usually read, as well as how to read them.

> #### Displaying Short Status Strings

> > Applets can display short status strings on the status line of the application in which they're running.

> #### Displaying Diagnostics to the Standard Output and Error Streams

> > When you're debugging an applet, displaying to the standard output can be an invaluable technique. This section discusses the applet-specific aspects of displaying to the standard output and error streams.

| Table of Contents