This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes java bean listens to itself? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java bean listens to itself?" Watch "java bean listens to itself?" New topic
Author

java bean listens to itself?

Bret Waldow
Ranch Hand

Joined: Aug 04, 2000
Posts: 58
I'm working my way through Stanchfield and Mauny's "Effective VisualAge for Java" and I noticed in the chapters where I'm creating beans with bound properties, the bean fires change notification to any other object that's registered itself as interested in the change.
The also provide two examples of adding (after the fact, of course) a bound property (the text in each case) to Swing JTextField and AWT TextField. In each of these cases, they also include modifications in the constructors so each bean notifies itself.
Why? I see no discussion in the book to tell me the difference, so I'll understand where and where not to apply this myself in the future. I'm SCJ2P, and I don't remember learning anything about this.
Thanks in advance,
Bret
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
I would have to believe that the beans were also listeners that reacted to some change in the textfield.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java bean listens to itself?
 
Similar Threads
How do I Call a Bean Function Using JSP?
Reading and Writing files using Java Script
Environment entries
basic doubt regarding beans
calling all geniuses - major issues :(