Previous | Next | Trail Map | Writing Applets | Creating an Applet User Interface


Defining and Using Applet Parameters

Parameters are to applets what command-line arguments are to applications. They allow the user to customize the applet's operation. By defining parameters, you can increase your applet's flexibility, making your applet work in multiple situations without recoding and recompiling it.

The next few pages discuss parameters from the applet programmer's point of view. To learn about the user view of parameters, see Specifying Parameters with the <PARAM> Tag(in the Writing Applets trail).

Deciding Which Parameters to Support

When implementing parameters, you must answer four questions:

Writing the Code to Support Parameters

Applets get the user-defined values of parameters by calling the Applet getParameter method.

Giving Information about Parameters

By implementing the getParameterInfo method, applets provide information that browsers can use to help the user set parameter values.


Previous | Next | Trail Map | Writing Applets | Creating an Applet User Interface