Applet viewer is a standard interpreter that accept, two different types of file that is H.T.M.L. and Java file when applet viewer interpreter reads the instruction form the H.T.M.L. file then it will directly search the applet tag within the multi line comment statement. Therefore it is necessary for Java developer to written the applet tag in the multi line comment statement in the Java file.
During the execution of Java file specified in the code attribute. Interpreter follows five different phases for the execution of applet program.
1 Void initialize ( )
Initialize ( ) is a standard met of applet class. This is the 1st met that is executed by the applet viewer interpreter during the execution of applet program this method is used to initialize the member variable of applet class.
- void start( )
Start ( ) is a standard method of applet class . This method is executed by the applet viewer interpreter after the execution of initialize ( ) method whenever the web page is reloaded or applet window is refused the applet viewer interpreter will invoke start ( ).
- Void paint(Graphics g)
Paint ( ) is a standard method of applet class, after the complete execution integer and start ( ) method. The applet viewer create on applet window and paint the client area by invoking paint met of applet class . Also this met is used to refresh the applet window or webpage.
Paint ( ) method provides the object of graphics class which used to perform graphical operation on the client are of applet window.
Graphics is a standard inbuilt class present in java out package containing met to perform graphical operation on the client area of applet windows.
- void stop ( )
Stop ( ) is standard inbuilt method of applet class whenever the webpage application stop the downloading process than its respective browser will invoke the stop ( ) method through applet viewer and interpreter
- void destroy ( )
Destroy ( ) is standard inbuilt method of applet class when ever the browser or applet window is closed then applet viewer interpreter will invoke destroy( ) method but before the invoke of this method it will invoke stop ( ) method to stop the current running process of applet program.
- Applet Programing in Java