An applet is small a Java program that runs inside another application, usually a web browser or an applet viewer. The JDK includes an applet viewer to help you test your applets. However, most of the time applets will run inside a web browser.
This chapter starts with a brief history of applets and by introducing the java.applet.Applet class. However, don’t use Applet directly. Instead, use javax.swing.JApplet, a subclass of Applet that is more powerful than its parent.
A Brief History of Applets
A couple of years after Java 1.0 was launched in 1995, applets dominated the World Wide Web’s dynamic content arena. People used applets to achieve what server technologies are good for today as well as to improve interactivity on ...