• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to detect the change?

 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create a JLabel and doing following steps to select one particular JLabel. and few method to support this are at the bottom. When ever I click on one label, it gets underlined.



Now inside my action listener class, how do I detect this change in the label? I tried using if(label.isFocusable())But it is not detecting. I need to find out the change that happened in JLabel and proceed further. Thanks
[ April 11, 2008: Message edited by: Gopu Akraju ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add a propertyChangeListener
 
Gopu Akraju
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response. I tried with propertychange listener like below and it works. When ever I click on JLabel, it gets underlined and Property changed gets printed. But how do I detect it?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!