• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java bean listens to itself?

 
Bret Waldow
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have to believe that the beans were also listeners that reacted to some change in the textfield.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic