0
\$\begingroup\$

Is there a way to set the cursor's location in JavaFX while the window is in focus? I've searched the possibility of the Scene's cursor object, but that leads to a dead end.

\$\endgroup\$
  • \$\begingroup\$ Heads up: JavaFX is completely useless for anything that isn't basic or requires more than 10 FPS (made up figure). OpenGL is recommended. \$\endgroup\$ – Lolums Nov 15 '15 at 20:09
  • \$\begingroup\$ What really? For my PC it does really well... \$\endgroup\$ – SirMathhman Nov 15 '15 at 23:27
  • \$\begingroup\$ It wasn't designed for games. Anything that requires any decent amount of rendering won't work out very well. You should check out LibGDX. \$\endgroup\$ – Lolums Nov 16 '15 at 6:23
  • \$\begingroup\$ I was looking at that however I never found any good tutorials... :( \$\endgroup\$ – SirMathhman Nov 16 '15 at 12:11
1
\$\begingroup\$

Did you tried the function mouseMove(int x, int y) like this:

new Robot().mouseMove(150, 200); ?

Source: Robot (Java 2 Platform SE 5.0)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.