import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class lained extends Applet implements MouseListener{ int x; int y; int x1; int y1; int i; int j; int k; int xb; int yb; int xa; int ya; public lained(){ addMouseListener(this); } public void mousePressed(MouseEvent e){ x1=e.getX(); y1=e.getY(); x=x1; y=y1; xa=x1; ya=y1; xb=x1; yb=y1; repaint(); } public void paint(Graphics g){ i=0; j=0; k=0; for(; i<200; i=i+2){ g.setColor(Color.black); g.drawOval(x, y, i, i); try{Thread.sleep(20);}catch(Exception e){} g.setColor(Color.blue); g.drawOval(x, y, i, i); x=x-1; y=y-1; if(i>50){ j=j+2; g.setColor(Color.black); g.drawOval(xa, ya, j, j); try{Thread.sleep(20);}catch(Exception e){} g.setColor(Color.blue); g.drawOval(xa, ya, j, j); xa=xa-1; ya=ya-1; } if(i>100){ k=k+2; g.setColor(Color.black); g.drawOval(xb, yb, k, k); try{Thread.sleep(20);}catch(Exception e){} g.setColor(Color.blue); g.drawOval(xb, yb, k, k); xb=xb-1; yb=yb-1; } } } public void mouseReleased(MouseEvent e){} public void mouseClicked(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public static void main(String[] argumendid){ Frame f=new Frame(); f.add(new lained()); f.setSize(500, 500); f.setBackground(Color.blue); f.setVisible(true); } }