Chapter 18. Applets

THIS chapter talks about the basics of applets, advantages of applets over applications, how to load applets in a Web page, how to convert applications to applets, and how applets work.

An applet is a special kind of Java program that a browser enabled with Java technology can download from the Internet and run. An applet is typically embedded inside a Web page and runs in the context of the browser. An applet must be a subclass of the java.applet.Applet class, which provides the standard interface between the applet and the browser environment.

Swing provides a special subclass of Applet, called javax.swing.JApplet, which should be used for all applets that use Swing components to construct their GUIs.

By calling certain methods, ...

Get The Java™ Tutorial Fourth Edition: A Short Course on the Basics now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.