示例#1
0
 /** This method cannot be called directly. */
 public void mousePressed(MouseEvent e) {
   synchronized (mouseLock) {
     mouseX = StdDraw.userX(e.getX());
     mouseY = StdDraw.userY(e.getY());
     mousePressed = true;
     // System.out.println(mouseX+" ,"+mouseY);
   }
 }
示例#2
0
 /** This method cannot be called directly. */
 public void mouseMoved(MouseEvent e) {
   synchronized (mouseLock) {
     mouseX = StdDraw.userX(e.getX());
     mouseY = StdDraw.userY(e.getY());
   }
 }