| LISTING 3: The Original Project's public void init() Method
|
public void init()
{
// PARAMETER SUPPORT
// The following code retrieves the
// value of each parameter
// specified with the <PARAM> tag and
// stores it in a member variable.
//-------------------------------------
String param;
// minSpeed
// minimum speed in either x or y
//-------------------------------------
param = getParameter(PARAM_minSpeed);
if (param != null
)
m_minSpeed = Integer.parseInt(param);
// maxSpeed
// maximum speed in either x or y
//---------------------------------------
param = getParameter(PARAM_maxSpeed);
if (param != null)
m_maxSpeed = Integer.parseInt(param);
// If you use a ResourceWizard-generated
// "control creator" class to arrange
// controls in your applet, you may want to
// call its CreateControls() method from
// within this method. Remove the following
// call to resize() before adding the call
// to CreateControls(); CreateControls()
// does its own resizing.
//-------------------------------------------
resize(320, 240);
// TODO: Place additional initialization
// code here
}