I want to customize a JLable to make him clickable, i'm not talking about adding an Action Listener because i already have, i'm talking about changing the mouse cursor's reaction when the JLabel gain Focus just like the reaction of a mouse hoover on a link in the browser.
I have impression that is not possible with swing.
How about:
label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
Swing APIs have a way of doing it:
label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
and when you change your mind:
label.setCursor(Cursor.getDefaultCursor());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With