• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't make mouse disappear in Java 1.4  RSS feed

 
Sam Smith
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a program that worked fine when I was using the Java 1.5 libraries, but now that I've changed it to 1.4.2 (Java HotSpot) I get an odd error that I haven't been able to fix.

I want to get my mouse cursor to disappear when it's inside a JFrame. The short program below replicates the problem on my computer. In it, I have two alternate ways of hiding my mouse. Both options work fine when I set my libraries to be 1.5. Using 1.4.2, they don't.

The first option simply fails to hide the mouse.
The second option again fails to hide the mouse, and also shows the following error message:


The error message doesn't terminate the program, only appears when I move my mouse over the frame, and repeats for as long as I move my mouse.

I'm using a Mac. A friend was unable to get the problem to show up using a PC, so it might be a platform-specific problem.

Does anyone know if either 1) there's a bug in my code which is easily changeable, or 2) if there's another way of hiding a mouse cursor that will work for me?

Any help would be very much appreciated!

--------

SSCCE:


[ December 07, 2006: Message edited by: Sam Smith ]
 
Sam Smith
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I wasn't able to find out what the bug is in the code above, but I do have some new code that appears to work, Posting here for anyone that comes across this with the same problem:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!