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  mouseP1 extends JPanel implements MouseListener,MouseMotionListener
{
  //push to draw a point
	int x1,y1;
 Color c;
 
 public mouseP1()
 {super();
  x1=0;y1=0;
  addMouseListener(this);
  addMouseMotionListener(this);
 }
 
 public mouseP1(int x1i,int y1i,int x2i,int y2i)
 {super();
  x1=x1i;y1=y1i;
 addMouseListener(this);
 addMouseMotionListener(this);
 }
 
 public void setLine(int x1i,int y1i,int x2i,int y2i)
 {x1=x1i;y1=y1i;}
 

 public void paint(Graphics g) 
    {   Graphics2D g2 = (Graphics2D)g;
        g2.setPaint(Color.black);
        Ellipse2D elips1=new Ellipse2D.Double(x1,y1,20,20);
        g2.fill(elips1);       
    }
    
//MouseListener (mouse dinleyicisi)
public void mouseClicked(MouseEvent e)
 { x1=e.getX();y1=e.getY();repaint(); }

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

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

 public void mouseEntered(MouseEvent e)
 { }

 public void mouseExited(MouseEvent e)
 { }

//MouseMotionListener (mouse hareket dinleyicisi) metotlari

 public void mouseDragged(MouseEvent e)
 {}
 
 public void mouseMoved(MouseEvent e)
 {}
 
}
