The Applet CLASS

Posted By on October 10, 2014

Download PDF
A "Hello, World" Applet
Multithreaded programming in java

Every applet is an extension of the java.applet.Applet class. The base Applet class provides methods that a derived Applet class may call to obtain information and services from the browser context.

These include methods that do the following:

  • Get applet parameters
  • Get the network location of the HTML file that contains the applet
  • Get the network location of the applet class directory
  • Print a status message in the browser
  • Fetch an image
  • Fetch an audio clip
  • Play an audio clip
  • Resize the applet

Additionally, the Applet class provides an interface by which the viewer or browser obtains information about the applet and controls the applet’s execution. The viewer may:

  • request information about the author, version and copyright of the applet
  • request a description of the parameters the applet recognizes
  • initialize the applet
  • destroy the applet
  • start the applet’s execution
  • stop the applet’s execution

The Applet class provides default implementations of each of these methods. Those implementations may be overridden as necessary.

The “Hello, World” applet is complete as it stands. The only method overridden is the paint method.

A "Hello, World" Applet
Multithreaded programming in java

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby