Share this Page URL

Chapter 19. Caffeinating Your Pages: Add... > How to Add a Java Applet to a Web Pa... - Pg. 223

Caffeinating Your Pages: Adding Java Applets 223 The critical chunk in this tag is the CODE attribute. The file part is the name of the "class" file that contains the Java code. Example I: A Java Clock Here's an example: <APPLET CODE="JavaTime.class" WIDTH="300" HEIGHT="60"> If you see this text, it means your browser doesn't support Java. </APPLET> The JavaTime.class file is a Java application I wrote myself. It implements a digital clock that displays the current date and time, as shown in Figure 19.3.