import java.applet.*;
import java.awt.*;
public class MyApplet
extends Applet
{
// All of the methods described here are called by other
// parts of the application. You should never be calling
// these methods directly.
public void MyApplet()
{
//The constructor is always called first.
//You can set any custom fields here if necessary.
//You should not assume that the applet is visible.
}
public void init()
{
// The application will call init() second
// Perform any initializations that you deferred
// from the constructor.
// The applet may or may not be visible.
}
public void start()
{
// The application will call start() after init()
// The applet is now "active" and should be visible.
// start() may be called multiple times.
}
public void stop()
{
// The application will call stop() before destroy()
// The applet is still "active" but you should take any
// action necessary should the applet not be visible
// for an extended period.
// stop() may be called multiple times.
}
public void destroy()
{
// The application will call destroy() last. No other
// methods will be called after destroy().
// Anything that needs to be done to clean up should
// be performed here.
}
public void paint(Graphics g)
{
// paint() is called whenever the virtual machine deems that
// applet needs to update its view on the screen.
// You should not assume that the applet is "active".
}
}
|