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