Some Light Relief—Think Big (and Small)

One early Java technology was applets—a Java program that runs in a browser. Someone who sets up a website can serve up executable Java programs referenced from HTML pages. When a user browses such a page, the Java code is downloaded to his or her system, along with the HTML text and images. A JVM inside the browser (safely and securely) executes the applet on the user's system.

You write an applet by extending the class javax.swing.JApplet, supplying your own child versions of some of the methods in the base class. At one time applets were very popular on the Internet, and they are still widely used for some applications on company intranets. They are also widely used at some educational sites.

Get Just Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.