The Basic Applet Life Cycle

  1. The browser reads the HTML page and finds any <APPLET> tags.
  2. The browser parses the <APPLET> tag to find the CODE and possibly CODEBASE attribute.
  3. The browser downloads the .class file for the applet from the URL found in the last step.
  4. The browser converts the raw bytes downloaded into a Java class, that is a java.lang.Class object.
  5. The browser instantiates the applet class to form an applet object. This requires the applet to have a noargs constructor.
  6. The browser calls the applet's init() method.
  7. The browser calls the applet's start() method.
  8. While the applet is running, the browser passes any events intended for the applet, e.g. mouse clicks, key presses, etc., to the applet's handleEvent() method. Update events are used to tell the applet that it needs to repaint itself.
  9. The browser calls the applet's stop() method.
  10. The browser calls the applet's destroy() method.

Previous | Next | Top | Cafe au Lait

Copyright 1997-1999 Elliotte Rusty Harold
Last Modified October 21, 1999