Tuesday, March 10, 2009

How do we pass a parameter from HTML page to Applet (Applets)

Question :How do we pass a parameter from HTML page to Applet? (Applets)
Answer :[html]
[applet code="Launch.class" archive="bak.jar" width=740 height=460]
[param name="lang" value="English"]
[/applet]
[/html]
And within the init() of your applet, Use the following line to get the value.
String langs = getParameter("lang");

No comments: