9.15. Summary

An applet is a type of graphical program that can be embedded in a Web page. Applets run on the client machine and consequently have various security restrictions. Applets are created by extending the java.applet.Applet class and are associated with a Web page through the APPLET element. Applets based on the newer Swing graphical components are possible; because browser support is lacking, Swing applets require installation of the Java Plug-In or require the Swing classes to be sent over the network, which is not a suitable approach for most Internet clients.

Graphical Java programs that will not be run in a Web browser are created by use of the Swing JFrame class. In the case of applets, drawing is typically performed in the

Get Core Web Programming, Second 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.