< APPLET = "Clock.class" width="200" height="60">< / A P P L E T >
When a browser encounters these tagsm it will start the VM and ask it to load Clock.class. It also tells the VM that the applet may draw in a region that is 200 x 60 pixels. The location of the <APPLET> tag in the document determines the coordinate of the top left of the applet's display area.
< html>
< head>
< title> Sample HTML Document< /title>
< /head>
< body>
< img src="Twinkle.gif" />
< h1>HTML Demo</ h1>
This document is a sample of HTML.
< p>
Share your expertise< a href=">http://groups.google.com/group/nanonagle-tech">Join Techno Talk Group< /a>
<P>
< APPLET = "Clock.class" width="200" height="60">< / A P P L E T >
</ body>
</ html>
As you can see, embedding applets into Web pages is simple. Java is able to create plug-in components that can be used by novices as well as experts. For this component strategy to work, the HTML author must be able to customize the properties and behaviour of the applet via HTML. The Java programmer decides which parameters will have meaning for the applet, and the HTML author uses <PARAM> tags to pass initial parameters to the applet. The clock applet needs no parameters, telling the time is a universal function.
No comments:
Post a Comment