import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Kaugusemoot extends Applet implements MouseListener, MouseMotionListener{ int suurus=40; int xd[] = new int[100]; int yd[] = new int[100]; int kokku=0; int hx; int hy; public Kaugusemoot(){ addMouseListener(this); addMouseMotionListener(this); } public void mouseClicked(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mousePressed(MouseEvent e){ Graphics g=getGraphics(); int x=e.getX(); int y=e.getY(); xd[kokku]=x; yd[kokku]=y; kokku++; g.setColor(Color.blue); g.fillOval(x-suurus/2, y-suurus/2, suurus, suurus); } public void mouseReleased(MouseEvent e){} public void mouseMoved(MouseEvent e){ Graphics g=getGraphics(); int x=e.getX(); int y=e.getY(); int i=0; while(i