import java.io.*;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.awt.geom.*;


public class  fare1 extends JApplet implements MouseListener,MouseMotionListener
{
  Container c;
  int x1,y1;
  
  public void init()
  {    
    c=getContentPane();
    c.addMouseListener(this);
    c.addMouseMotionListener(this);
    x1=0;y1=0; 
  }
    public void paint(Graphics g) 
    {   Graphics2D g2 = (Graphics2D)g;
        g2.setPaint(Color.black);
        Ellipse2D elips1=new Ellipse2D.Double(x1,y1,2,2);
        g2.fill(elips1);
        
    }
//MouseListener (fare dinleyicisi)
public void mouseClicked(MouseEvent e)
 {  }

 public void mousePressed(MouseEvent e)
 { }

  public void mouseReleased(MouseEvent e)
 {}

 public void mouseEntered(MouseEvent e)
 { }

 public void mouseExited(MouseEvent e)
 { }

//MouseMotionListener (fare hareket dinleyicisi) metotlari

 public void mouseDragged(MouseEvent e)
 {x1=e.getX();y1=e.getY();repaint();}
 
 public void mouseMoved(MouseEvent e)
 {}
 

    public static void main(String s[])
    {
        JFrame f = new JFrame("fare kontrol programę");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {System.exit(0);}
        });
        JApplet applet = new fare1();
        f.getContentPane().add("Center", applet);
        applet.init();
        f.pack();
        f.setSize(new Dimension(545,400));
        f.setVisible(true);
    }
}





