Sunday 25 March 2012

Passing Parameters to Applet

•The <applet> tag in html allows us to pass parameters to the applet.
•The <param> tag is used to specify parameter name and value.
•The “name” attribute/option of the <param> tag is used to specify the name of the parameter.
•The “value” attribute/option of the <param> tag is used to specify the value for the parameter.
•The “getParameter()” method in the “Applet” class is used to access the parameters from the <applet> tag. This method returns the parameter value in the form of “String”.

•Syntax of getParameter() method is:
 String getParameter(String name)

No comments:

Post a Comment