Java Reference
In-Depth Information
Summary
An applet is a Java program that runs in a Web browser. An applet is
written by extending the java.awt.Applet class.
■■
When an applet is instantiated in a browser, the browser communicates
with the applet by invoking the init(), start(), stop(), paint(), and
destroy() methods.
■■
A Swing applet extends the javax.swing.JApplet class.
■■
Applets run in a security context referred to as a sandbox. This limits
what an applet can do on a person's PC. For example, applets cannot
access the local file system or start other applications.
■■
The appletviewer tool that comes with the SDK is useful for the devel-
opment of applets.
■■
An applet uses the AppletContext to communicate with the browser,
allowing the applet to communicate with other applets on the same
page or to display a URL.
■■
An applet can display images and play audio files.
■■
The applet class and all the corresponding files that it uses can be placed
in a JAR file for faster downloading and simplifying deployment.
■■
Search WWH ::




Custom Search