import java.awt.*; import java.applet.Applet; import java.applet.*; import java.awt.Graphics; import java.awt.Color; public class Too1 extends Applet{ public void paint(Graphics g){ g.setColor(Color.red); g.drawRect(350,180,140,100); g.fillRect(350,180,140,100); g.drawLine(350,180,420,20); g.drawLine(420,20,490,180); g.setColor(Color.blue); g.drawRect(370,200,60,40); g.fillRect(370,200,60,40); g.setColor(Color.black); g.drawLine(400,200,400,240); g.drawLine(370,220,430,220); g.drawRect(450,210,40,70); g.fillRect(450,210,40,70); g.setColor(Color.black); g.drawRect(50,150,20,130); g.fillRect(50,150,20,130); g.setColor(Color.green); g.drawOval(10,10,100,200); g.fillOval(10,10,100,200); for(int x=0; x<400; x=x+2){ g.setColor(Color.yellow); g.drawOval(x,0,30,30); g.fillOval(x,0,30,30); try{Thread.sleep(100);}catch(Exception e){} g.setColor(Color.white); g.drawOval(x,0,30,30); g.fillOval(x,0,30,30); } for (int x=0; x<500; x=x+2){ g.setColor(Color.green); g.drawLine(x,270,x,300); } } }