public void init() { Image img = getImage(getCodeBase(), "image.jpg"); }
In this example, The applet belonging to the MyApplet class in this illustration has dimensions of 300 x 200 pixels. Name and age are two additional parameters. The name parameter has the value "Rama" and the age parameter has the value "25"
Using the getParameter method of the Applet class, you can access the applet's parameters.
public class MyApplet extends Applet { String name; int age; public void init() { name = getParameter("name"); age = Integer.parseInt(getParameter("age")); } }
Police Colony
Patna, Bihar
India
Email:
Post your comment