Parameter in Java Program
Parameter in Java Program
import java.applet.*;
public class ParamTestApplet extends Applet
{
Font f=new Font("arial",Font.ITALIC,50);
String name;
public void init()
{
name=getParameter("fname");
if(name==null)
{
name="friend";
}
name="have a nic day"+name;
}
public void paint(Graphic g)
{
g.setFont(f);
g.setColor(color.pink);
g.drawString(name,100,100);
}
}
/*<applet code="ParamTestApplet.class" width=300 height=400></applet>*/
0 coment�rios:
Post a Comment