When an applet begins, the AWT calls the following methods, in this sequence:
1. init( )
2. start( )
3. paint( )
When an applet is terminated, the following sequence of method calls takes place:
4. stop( )
5. destroy( )
init ( ):The init( ) method is the first method to be called. This is where you should initialize Variables. This method is called only once during the run time of your applet.
start( ):The start( ) method is called after init( ).It is also called to restart an applet after it has Been stopped. Whereas init( ) is called once—the first time an applet is loaded—start( )is called each time an applet’s HTML document is displayed onscreen.
Paint ( ): The paint ( ) method is called each time your applet’s output must be redrawn. Paint ( ) is also called when the applet begins execution. Whatever the cause, whenever the applet must redraw its output, paint( ) is called. The paint ( ) method has one parameter of type Graphics.
Stop ( ): When stop ( ) is called, the applet is probably running.
You should use stop ( ) to suspend threads that don’t need to run when the applet is not visible.
destroy( ): The destroy ( ) method is called when the environment determines that your applet needs to be removed completely from memory.