I’ve been trying to translate the position of the Mouse to actual X/Y coordinates, using two integer variables mouseX and mouseY. When the program starts, I use java.awt.Robot to move the mouse to 300,300 and set the mouse position to that point. Then, every time I poll the mouse I add the value of its x component and its y component to the position variables, because what I understood as the mouse value was what its pixel change was. However, when I output the mouse values, they are completely wrong, changing much more over the same distance if I move the mouse slowly rather than quickly, sometimes eventually becoming entirely negative (which is obviously wrong).
Any ideas?