import java.applet.Applet;
import java.awt.*;
public class graph extends Applet {
Font f=new Font("cambria",65,32);
public void init()
{
this.setFont(f);
}
public void paint(Graphics g)
{
g.drawLine(220,114,120,240);
g.drawLine(220,114,320,240);
g.drawLine(125,235,125,350);
g.drawLine(315,235,315,390);
g.drawLine(125,350,315,390);
g.drawLine(220,114,400,114);
g.drawLine(315,235,490,235);
g.drawLine(400,114,490,235);
g.drawLine(490,235,490,350);
g.drawLine(315,390,490,350);
g.drawRect(385,275,50,40);
g.drawLine(255,377,255,260);
g.drawLine(190,363,190,260);
g.drawLine(255,260,190,260);
g.drawLine(490,325,590,325);
g.drawLine(490,345,590,345);
g.drawLine(490,305,590,305);
g.drawLine(125,325,25,325);
g.drawLine(125,345,25,345);
g.drawLine(125,305,25,305);
g.drawString("HOME SWEET HOME",175,90);
}
}
import java.awt.*;
public class graph extends Applet {
Font f=new Font("cambria",65,32);
public void init()
{
this.setFont(f);
}
public void paint(Graphics g)
{
g.drawLine(220,114,120,240);
g.drawLine(220,114,320,240);
g.drawLine(125,235,125,350);
g.drawLine(315,235,315,390);
g.drawLine(125,350,315,390);
g.drawLine(220,114,400,114);
g.drawLine(315,235,490,235);
g.drawLine(400,114,490,235);
g.drawLine(490,235,490,350);
g.drawLine(315,390,490,350);
g.drawRect(385,275,50,40);
g.drawLine(255,377,255,260);
g.drawLine(190,363,190,260);
g.drawLine(255,260,190,260);
g.drawLine(490,325,590,325);
g.drawLine(490,345,590,345);
g.drawLine(490,305,590,305);
g.drawLine(125,325,25,325);
g.drawLine(125,345,25,345);
g.drawLine(125,305,25,305);
g.drawString("HOME SWEET HOME",175,90);
}
}
output:
No comments:
Post a Comment
SAY HELLO!!