• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change the mouse cursor

 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How can I change the default mouse cursor when my cursor moves over a JLabel and change it back to the default when it moves away from the JLabel?

Thanx
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Component has a setCursor method which takes a Cursor object. You can create Cursor objects using the constants in Cursor, such as Cursor.HAND_CURSOR.
 
Mamu Jan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Rob !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic