Applet Life Cycle



Java API support for Applets

Java includes many libraries (known as packages) and classes, commonly known as Java API. java.applet is a small package used to develop applets. Following are the classes and interfaces of "java.applet" package.

Interfaces

  1. AppletContext: Used by the programmer to communicate with the execution environment of an applet. This is required to communicate between two applets.
  2. AppletStub: Used to develop custom applet viewers. Programmer can utilize this interface to communicate between applet and the browser environment
  3. AudioClip: Used to play audio clips. It comes with methods like play(), loop() and stop().

Class

  1. Applet: This class should be extended by our applet program. Applet is a class inherited from Panel of java.awt package.

Following is the hierarchy of Applet class.

Applet Hierarchy

24 thoughts on “Applet Life Cycle”

  1. Thanx for ur explanation sir it is very easy to learn sir i have a doubt

    In the above ‘LifeTest.java’ when am executing this file am not writing ‘init()’ method even though it is executing remaining methods but in ur explanation ‘init()’ method starts ‘start()’ method but how ‘start()’ method will called with out writing ‘init()’ method? please clear me sir

Leave a Comment

Your email address will not be published.