Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4511093

Robot.mouseMove is not moving to right location on Windows2000.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs
    • None
    • x86
    • windows_2000

      mouseMove method of Robot is not moving to right location on Windows2000.

      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b81)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b81, mixed mode)


      To reproduce :
      1. Compile and execute the following code :

      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class TestGetScreenLoc extends JFrame{
      JTextField tf;
      Robot robo;
      public static void main(String[] args) {
      System.out.println("Hello World!");
      new TestGetScreenLoc();
      }
      TestGetScreenLoc() {
      super("TestGetScreenLoc");
      setSize(200,200);
      getContentPane().setLayout(new FlowLayout());
      tf = new JTextField("Testing screen location.");
      getContentPane().add(tf);
      setVisible(true);
      try {
      robo = new Robot();
      } catch (Exception e) {
      System.out.println(e.toString());
      }
      Point pt = tf.getLocationOnScreen();
      System.out.println("Location of JTextField is >> " + pt);
      robo.mouseMove(pt.x, pt.y);
      }
      }

      2. You will see that mouse doesn't move to respective location.

            rraysunw Richard Ray (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: