Manage multiple Jlabel's events
Posted
by
IMAnis_tn
on Stack Overflow
See other posts from Stack Overflow
or by IMAnis_tn
Published on 2012-04-14T10:50:14Z
Indexed on
2012/04/14
11:29 UTC
Read the original article
Hit count: 227
I have a left Panel with multiples Jlabels which i use them as buttons to change a Main Panel's content which is layouted with a CardLayout.
I cant work perfectly with these events:
mouseEntered : to make highlight effect to the jlabel
mouseExited : to take off the highlight effect.
mouseClicked : to change the content of the main Panel and start some threads
The problem here that can't found an event or a method tell me that another Jlabel has been clicked so i can stop my threads started in the mouseClicked event,
OR
an event or method tell me that a JPanel in the CardLayout has been displayed or hidden.
© Stack Overflow or respective owner