change color of the mouse method

J

Justin

I have a java app with a picture in it. When the mouse scrolls over a
certain regions in the picture (which I have mapped out), I would like
the color of the mouse to change from white to red or yellow or some
other color. I've tried looking through the javadocs, but I quickly
realized that I am unsure of what I am looking for. Any help would be
appreciated.

Thanks
 
O

Oliver Wong

Justin said:
I have a java app with a picture in it. When the mouse scrolls over a
certain regions in the picture (which I have mapped out), I would like
the color of the mouse to change from white to red or yellow or some
other color. I've tried looking through the javadocs, but I quickly
realized that I am unsure of what I am looking for. Any help would be
appreciated.

Sounds like you want to use setCursor:

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.html#setCursor(java.awt.Cursor)

You'll probably have to define your own custom cursor, though.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top