|
Java™ by example!
|
|
|
How do I change the mouse cursor when moving over a component?
Add a mouse listeners to the component and set another cursor when the mouse enters it. Set it to the default cursor when the mouse moves out of it. Here's an example that creates a JFrame with a number of buttons, each with a different mouse cursor. Our method createCursor will associate a cursor to a component.
Further Information
Author of answer: Joris Van den Bogaert
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|