954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mouse cursor effects

Hi, how would I go about changing the mouse cursor image? I have a jLabel with an image of graph on it and I would likt the mouse cursor to change to a cross-hair when the mouse is moved onto the jLabel. Does anyone have an idea as to how to achieve this?

Thanks!!

matt_5104
Newbie Poster
15 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

here's a site detailing changing the mouse cursor. http://www.devdaily.com/java/edu/pj/pj_hourglass_cursor/
just substitute whatever cursor you want it to be (there's a list down the page a bit of the cursor constants) in the code. I would recommend you then implement MouseListener to check that the cursor is/isn't ove the JLabel
-tom

mcclth
Newbie Poster
10 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You