@Override public void mousePressed(MouseEvent e){
synchronized (mouseLock) {
    mouseX=StdDraw.userX(e.getX());
    mouseY=StdDraw.userY(e.getY());
    mousePressed=true;
  }
}

@ Override public void mousePressed ( MouseEvent e ) { synchronized ( mouseLock ) { mouseX = StdDraw . userX ( e . getX ( ) ) ; mouseY = StdDraw . userY ( e . getY ( ) ) ; mousePressed = true ; } }
this method cannot be called directly .
