import java.awt.*; import java.awt.event.*; public class Tilk2 extends Frame implements MouseListener{ public void mousePressed(MouseEvent e){ int x=e.getX(); int y=e.getY(); double vahe=0.5; Graphics g=this.getGraphics(); for(;y0; d--){ g.setColor(Color.blue); g.fillOval(x, y, d, d); try{ Thread.sleep(30); }catch(Exception ex){} g.setColor(Color.white); g.fillOval(x, y, d, d); } } public void mouseReleased(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mouseClicked(MouseEvent e){} void joonistaTilk(Graphics g, int x, int y){ g.fillOval(x, y, 10, 10); Polygon p=new Polygon(); p.addPoint(x, y+5); p.addPoint(x+10, y+5); p.addPoint(x+5, y-10); g.fillPolygon(p); } public static void main(String argumendid[]){ Tilk2 f=new Tilk2(); f.setSize(300, 300); f.setVisible(true); f.addMouseListener(f); } }