I have a JTabbedPane and have two JPanels forming the two tabs. I need
to set the default button on one or other Panel depending which one is
active / showing at the time.
How do I do this ? I need to toggle the default buttons on the panels
but I need to know which panel is currently showing. Do I detect the
active panel using a listener on both Panel classes or can I detect
something and set it in the JTabbedPanel ??
TIA
Eddie
> I have a JTabbedPane and have two JPanels forming the two tabs. I need
> to set the default button on one or other Panel depending which one is
[quoted text clipped - 4 lines]
> active panel using a listener on both Panel classes or can I detect
> something and set it in the JTabbedPanel ??
If I understand you correctly, JTabbedPane has a addChangeListener that
will give you this information.

Signature
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Eddie Fung - 18 Nov 2004 00:05 GMT
Chris,
spot on !! Works like a dream. Thanks a lot ! :-)
=====================
> If I understand you correctly, JTabbedPane has a addChangeListener that
> will give you this information.