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 ...
Get Special Edition Using Java 2 Standard Edition 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.