Applet Life-Cycle With Examples

In this topic, you will learn about, Applet Life-Cycle With Examples.

Applet: Applet is a package that allows you to design a website component or website area. it is a GUI based application development methods that use graphics, AWT, and events.

Applet program creates or compiles same as simple java Program but run or execute on a web browser or applet viewer. applet package provides applet class extend with any class.

It allows creating windows components like buttons, textbox, radio buttons, list box and it also uses event. applet program link with HTML code using applet tag where applet tag specifies applet size.

Applet life cycle:

Table of Contents



  1. Init(): In applet init method allows to initialize applet object and component. init method call automatically when the applet invokes or execute.
  2. Paint: this method allows you to draw any string or save it on the applet area. paint receives graphics type argument.
  3.  Repaint: it re-execute the paint method from outside of the paint method.
  4. Stop: It used to destroy or exit from a current calls automatically and can be called by the programmer.

Also, read the Difference between Applet and Application.

Comment below if you have queries related to the above topic, Applet Life-Cycle With Examples.