Explain the life cycle of an applet.

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.
What is the purpose of finalization?
What is the purpose of finalization? - Finalization is the facility to invoke finalized() method. The purpose of finalization is to perform some action....
Difference between the File and RandomAccessFile classes
Difference between the File and RandomAccessFile classes - The File class is used to perform the operations on files and directories of the file system of an operating......
Define class and object
Define class and object - Class: A class is a program construct which encapsulates data and operations on data. In object oriented.....
Post your comment