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