Summary

Section 20.1 Introduction

  • Applets are Java programs that can be embedded in HTML documents.

  • When a browser loads a web page containing an applet, the applet downloads into the web browser and executes.

  • The browser that executes an applet is known as the applet container. The JDK includes the appletviewer applet container for testing applets before you embed them in a web page.

Section 20.2 Sample Applets Provided with the JDK

  • To reexecute an applet in the appletviewer, click the appletviewer’s Applet menu and select the Reload menu item.

  • To terminate the appletviewer, select Quit from the appletviewer’s Applet menu.

Section 20.3 Simple Java Applet: Drawing a String

  • Every Java applet is a graphical user interface on which you can place ...

Get Java™ How to Program, Seventh 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.