Appendix 2 Running Applets
As you know, applets are Java programs that are run from a Web page. The document that defines any Web page is written in HTML, which is a language designed for this purpose. Chapter 14, which is available on the book’s Web site, provides some details about writing an HTML document. However, we can also use the Java tool appletviewer to run our applet. This tool requires a simple HTML document that we can write without looking at the details given in Chapter 14. Note that if you are using an IDE, you likely can run an applet without any reference to HTML.
After you have written an applet, you should compile it. If your applet code is in the file MyApplet.java, for example, compiling this file produces another file— ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access