Life Cycle of an Applet IN JAVA
The creation of any applet requires the implementation of four methods of the Applet class. These methods have been discussed in the below.
- init: This method is planned for whatever introduction is required for your applet. It is called after the param labels inside the applet tag have been transformed.
- start: This method is naturally called after the program calls the init strategy. It is likewise called at whatever point the client comes back to the page containing the applet in the wake of having gone off to different pages.
- stop: This method is consequently called when the client leaves the page on which the applet sits. It can, accordingly, be called over and over in the same applet.
- destroy: This technique is just called when the program closes down. Since applets are intended to live on a HTML page, you ought not regularly desert assets after aclient leaves the page that contains the applet.
- paint: This method is invoked quickly after the start() method. Furthermore, whenever the applet needs to repaint itself in the program, this method needs to be called. The paint() method is inherited from the java.awt.