Explain the life cycle of an applet.Below are sequences of methods that describes the life cycle of an applet.
Init() This is first method called when applet loads. This method can be used to set applet attributes like color, fonts etc.
Start() This method starts a thread in which it runs the paint method.
Paint() This method is called every time when an applet has to re-display.
Stop() It is called when the user goes to the other page.
Distroy() This is called when the browser exits. We can use this method for cleaning non java resources.
|