O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HelloWorld as an Applet

One of the features of Java that first drew public attention was its capability to add dynamic content to HTML pages using applets. Applets are Java classes that you can execute in a Java-enabled browser such as Netscape Navigator or Internet Explorer. Before applets were introduced, Web sites consisted solely of static HTML content.

Several differences exist between applets and applications. Most of these differences will be explained in Part II, "User Interface." For the HelloWorld example, the most important difference in the source code is that applets must define a subclass that inherits from the SDK's java.applet.Applet class (or its javax.swing.JApplet subclass if you're developing a Swing applet). For now, it's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required