Home » » Parameter in Java Program

Parameter in Java Program

Parameter in Java Program

Parameter in Java Program

Parameter in Java Program

import java.awt.*;
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

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g