aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes getting notification from JLabel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getting notification from JLabel" Watch "getting notification from JLabel" New topic
Author

getting notification from JLabel

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
during my google i read this:
Components (except JLabel) can generate events

i was surprised, but in fact couldnt find any answer to my Q:
how can i be notified when a JLabel's text change?

TiA


java amateur
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281

no one will claim that wasnt notified

before posting my Q i stood twice at API: addPropertyChangeListener, but gave up since couldnt find any 'text'
property
i missed the fact that could exist others:
The listener is registered for all bound properties of this class, including the following:

my actual interpretation is the following: JLabel is a bean, 'text' is also a bound property so ...

thanks a lot Michael

EDITED: i cant post the direct link to 'addPropertyChangeListener' because of javaRanch html code policies
[ June 27, 2005: Message edited by: miguel lisboa ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting notification from JLabel
 
Similar Threads
Getting a Component to show?
Image in JTable
Need some advice with a JLabel issue.
problem in creating more than one objects
BoxLayout not working as advertised?