I've got a panel (we'll call him "George") that contains relationships to several child panels (we'll call each of them "Junior"). Each of these child panels contain components ranging from JTextFields to JLists to JRadioButtons to Custom Components. Is there a way to wire up a Listener of some type on each "Junior" so that it will capture a change to any of its sub components? The listener would set a Dirty flag so that "George" knows he should enable the save button when control returns to him.
I know I could pop a listener on each of the Field level components on each of the panels, but I would like to set the listener up at the panel level if possible. That way I could reuse the same code on each panel and any new panels that are added without having to worry about what types of components that panel contains.
I am pretty sure there isn't anything built into the API for this. There is a ContainerListener and a ComponentListener but all they do is tell you when something is added, removed, or moved.
There still has to be some way for your child components of Junior to notify Junior that something about them has changed aside from the actions I mentioned above.
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
a bit of art, as a gift, that will fit in a stocking