Oct

29

import java.applet.*;
import java.awt.*;
/*
<applet code=”App2.class” width=”250″ height=”250″>
</applet>
*/
public class App2 extends Applet{
public void init(){
setBackground(Color.yellow);
setForeground(new Color(88,200,0));
}
public void paint(Graphics g){
g.setFont(new Font(“Comic sans ms”,Font.BOLD,30));
g.drawString(“HELLLO”,40,40);
g.setFont(new Font(“Verdana”,Font.BOLD,30));
g.drawString(“HELLLO”,40,80);
g.drawLine(20,120,150,120);
g.drawOval(20,130,150,120);
g.fillOval(60,170,20,20);
g.fillOval(120,170,20,20);
g.drawLine(90,180,90,210);
g.fillOval(100,220,70,20);
}
}


Leave a Reply