It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes How to reflect an event that occurs in a bean to an applet which holds the bean ?!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to reflect an event that occurs in a bean to an applet which holds the bean ?!!" Watch "How to reflect an event that occurs in a bean to an applet which holds the bean ?!!" New topic
Author

How to reflect an event that occurs in a bean to an applet which holds the bean ?!!

Meghna ks
Ranch Hand

Joined: Mar 15, 2001
Posts: 122
Hi , Here's my design of a bean -> Propertiesbean which is similar to a propertylist that exists in VisualCafe or VB.
I have a bunch of Labels 7 TextFields which are laid on panels. The panels are furthur added to a splitpane, and finally, the splitpane is added to a scrollpane. In the splitpane, the left component is the panel that comprises of labels, and the right component is a bunch of TextFields & Comboboxes.
My question is : Whenever I type in something inside the textfield of the bean, the text I type must be reflected on a TextField which already exists inside an applet which also holds the bean. How do I take care of this ?!! I would really appreciate it if someone can give me an approach to this problem ?!!
Thanks
Meghna
Meghna ks
Ranch Hand

Joined: Mar 15, 2001
Posts: 122
I'm still waiting. Hope to find some answers soon !!!
syed fazal faheem
Greenhorn

Joined: Jul 13, 2001
Posts: 12
Hi,
Why dont u try using a document model for the text fields. If u use the same model for both the text fields, changing value in one will reflect in another.
Hope this solves ur problem.
fazal.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17166
    
  27

The magic words are "property change listener"
This may help:
http://www.ddj.com/articles/1999/9902/9902d/9902d.htm


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to reflect an event that occurs in a bean to an applet which holds the bean ?!!
 
It's not a secret anymore!