• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Running the Applet

If you were writing an application, you could invoke the Java interpreter from the command line to run the class. An applet, however, requires a browser environment, so you'll have to write some HTML to display the applet.

Writing the HTML

Listing 36.2 shows a simple Web page that includes the HelloApplet applet. This Web page will work with the appletviewer—you'll want to improve the HTML by adding a head, title, background color, and perhaps some text before you use it on your Web site.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint