by, 01-08-2012 at 12:41 PM (1012 Views)
Initialization code of the Java applet is written in init() method. It is just like a constructor for an applet.
Java applet contains the following life cycle methods.
• init() : This method is used to initialize an applet and only once called in applet life cyle by the browser.
• start() : This method is called after init() and contains code to start processing. Start() method is called again, if user leaves current page without killing session.
• stop() : This method is used to stop all processing started by Applet.
• destroy() : It is called when browser session is terminated. All resources occupied by Applet are released in this method.