How do I read applet parameters?

John Zukowski

To get parameters from the HTML file that loaded an applet, use the applet's getParameter() method. Specify the parameter name as the argument. For example, for the following HTML file:

<APPLET code=Foo width=300 height=300>
<PARAM name=Bar value="Hello">
</APPLET>
You would use the following to get the value of the Bar parameter. If Bar wasn't specified, getParameter("Bar") would return null.
String barValue = getParameter("Bar");
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact