title: Incompatible Types Java
body: <p>this is my first question. 
  And this problem has been eating me inside. So basically everytime i compile my program i get an error and it's as follows:</p>
  
  <pre><code>**Paint.java:40: error: incompatible types: java.awt.Point cannot be converted to
  Point
                          pt = me.getPoint();
                                          ^
  Paint.java:45: error: incompatible types: java.awt.Point cannot be converted to
  Point
                          pt = me.getPoint();
                                          ^
  2 errors**
  </code></pre>
  
  <p>Here's my Code:</p>
  
  <pre><code>    import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
  
  public class Paint extends JFrame implements MouseMotionListener{
  
  
      /*public class Point {
          public int x, y; // Possible
  
          public int getX(){ return x;}
          public int getY(){ return y;}
  
      }*/
  
      private Point pt = new Point();
      private Graphics g;
  
      public Paint(){
          super("Painter");
          add(new Label("Drag mouse to draw"),BorderLayout.SOUTH);
          JPanel jp = new JPanel();
          add(jp, BorderLayout.CENTER);
          setSize(400,400);
          setVisible(true);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
      }
  
      public void paint(Graphics g){
          g.fillOval((int) pt.getX(), (int)pt.getY(), 5,5);
      }
  
  
      @Override
          public void mouseDragged(MouseEvent me){
              Graphics2D g = (Graphics2D)getGraphics();
              g.setStroke(new BasicStroke(4));
              g.setColor(Color.BLUE);
              g.drawLine(pt.x,pt.y, me.getX(), me.getY());
              pt = me.getPoint();
          }
  
      @Override
          public void mouseMoved(MouseEvent me){
              pt = me.getPoint();
          }
  
      public static void main(String[] args){
          new Paint();
      }
  
  }
  </code></pre>
  
  <p>This program is supposed to end up as a Simple Paint Program. 
  Thanks for your help in advance.</p>