Applet Adding HTML to html file

To execute an applet in a web browser, you need to write a short HTML text file that contains the appropriate APPLET tag. Here is the HTML file that executes SimpleApplet:

<Applet code = "Hellojava.class" width = 400 Height = 200 >

The width and height attributes specify the dimensions of the display area used by the applet. After you create this file, you can execute the HTML file called RunApp.html (say) on the command line.

c:\ appletviewer RunApp.html

Share this article on