4 Replies Latest reply: Mar 22, 2011 2:33 PM by morgalr RSS

    getX and getY does not return accurate results

      I have a tree view and it has been working for a few years. The sample code is:

      public void mouseMoved(MouseEvent e) {
      //System.out.println("mouse Moved");
      mouseX = e.getX();
      mouseY = e.getY();

      I use the coordinates for a mouse click later to determine where the mouse is located within the applet. Recently, I have had 3 computers that do not return the correct xy for the mouse location. It seems to be about -15 to -20 off from the mouse.

      Any suggestions for this type of behavior? 2 users are on laptops and one is on a desktop with a large monitor.