Embed an Applet
Although HTML 4 specification states that the applet tag is deprecated, it is recommended that you use the applet tag to embed Java applets across browsers on all platforms because it is more consistent than other methods.
Please note that with HTML 5, you will need to use the object tag to embed java applets.
Here is an example of the applet tag:
<applet code="Hello.class" width="100" height="100"> Java applet that says Hello World! </applet>
For both Internet Explorer and the Mozilla family of browsers, if Java Plug-in is installed (version 1.4+) then the latest installed version of Java Plug-in is used to run the applet.
The param element
The param element passes information to the java applet. Take a look at this example:
<param name="username" value="Spongebob">
and to read the passed information, we use the following in java:
String username = getParameter("username");
You can use param for a variety of reasons, such as customizing the applet’s appearance.
No related posts.