-1

I have this code:

Robot mov = null;
try {
     mov = new Robot();
} catch (AWTException e1) {
    e1.printStackTrace();
}
if(movedy!=0&&movedx!=0) {
    mov.mouseMove(300, 300);

}

And on my PC, IT never moves the mouse to the correct location. Interestingly though, it works on my Mac. Any help would be appreciated

Snowy_1803
  • 656
  • 2
  • 8
  • 24
Jamal H
  • 934
  • 7
  • 23

1 Answers1

0

This would most likely point to your resolution. (300, 300) is not going to be the same location on two different computers if they do not have the same resolution. I would use relative location by pulling in the location of another component or manually change (300, 300) to something closer to what you need.

Zach Pedigo
  • 396
  • 2
  • 9