CHAPTER 21

Building Applets

What is an applet? An applet is a Panel (inherits from Panel), which can be embedded on a Web (HTML) page. What are the additional features of Applet compared to a Panel? There are no GUI-related additional features in Applet compared to a Panel, but it has the capability of interacting with the Browser, and has a life cycle based on which it is managed by the Browser. When an applet is viewed on a Web page on the browser, the browser invokes the life-cycle methods based on the activity taking place within the browser, related to the applet.

For an applet to be able to work in a browser, the browser must have JVM. The JVM needs to be started before the Applet can be used. When is the JVM started? The JVM is normally ...

Get The class of Java 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.