import java.awt.*; import java.awt.event.*; public class Liigu1 extends Frame implements MouseMotionListener{ public Liigu1(){ setSize(300, 300); setVisible(true); addMouseMotionListener(this); } public void mouseMoved(MouseEvent e){} public void mouseDragged(MouseEvent e){ Graphics g=this.getGraphics(); g.setColor(Color.white); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.black); g.drawOval(e.getX()-5, e.getY()-5, 10, 10); } public static void main(String argumendid[]){ new Liigu1(); } }