import java.awt.*;
/* <applet code ="star" height=300 width=200>
</applet>
*/
public class star extends java.applet.Applet
{
public void paint(Graphics g)
{
g.setFont ( new Font ("Helvetica",Font.BOLD,20));
g.drawString("HI",112,112);
g.setColor(Color.red);
g.drawLine(50,75,200,75);
g.drawLine(125,25,75,175);
g.drawLine(125,25,175,175);
g.drawLine(50,75,175,175);
g.drawLine(75,175,200,75);
}
public void update(Graphics g)
{
paint(g);
}
}
/* <applet code ="star" height=300 width=200>
</applet>
*/
public class star extends java.applet.Applet
{
public void paint(Graphics g)
{
g.setFont ( new Font ("Helvetica",Font.BOLD,20));
g.drawString("HI",112,112);
g.setColor(Color.red);
g.drawLine(50,75,200,75);
g.drawLine(125,25,75,175);
g.drawLine(125,25,175,175);
g.drawLine(50,75,175,175);
g.drawLine(75,175,200,75);
}
public void update(Graphics g)
{
paint(g);
}
}
No comments:
Post a Comment