How can I hide the mouse cursor on whole screen in Java? I used the transparent gif techinique, but it only works on the JFrame area. I need it to work outside the JFrame bounds.
Asked
Active
Viewed 8,312 times
2 Answers
1
One way is to use transperent GIF and another is mentioned here
-
Take a full screened JFrame and make visible only that part which is required. – jmj Sep 22 '10 at 12:48
0
I think an application that can hide the cursor for itself and any other application running on the same desktop is, well, not desirable for usability and maybe security implications. Therefore I guess the win32 API has numerous ways to do it. Even by accident. But (un?)fortunately Java has no API to accomplish this.
Possibly the Robot is of help for you. You could create a full-sceen capture which gets displayed in turn by an full-screen JFrame
which in turn has no visible pointer.

Waldheinz
- 10,399
- 3
- 31
- 61
-
1no offense, but i would vote this down if i had a bit more reputation...there are plenty of use cases (e.g. art and museum installations) in which interaction with the content is achieved through non-mouse+keyboard interfaces, and a mouse cursor can be distracting or misleading. – ericsoco Aug 30 '11 at 20:22
-
3But such an installation would likely be implemented as an full-screen application, which can hide it's mouse cursor as it likes. My main point was that it seems a bad idea if one application was able to hide the mouse cursor globally (or for any other application). – Waldheinz Sep 01 '11 at 12:09