Action selected state in JDK 1.5  
Author Message
Karsten Wutzke





PostPosted: 2007-5-22 0:53:00 Top

java-programmer, Action selected state in JDK 1.5 Hello all!

Does anyone know of or have a solution of how to have automatic
updates for buttons and menu items created from Action's FOR JDK 1.5?
I know that automatic support for it was added in JDK (1.)6.0, however
the requirements for the software I'm developing is Java 5...

When calling new JMenuItem(Action) or JButton(Action), basically any
radio button or checkbox AbstractButton component, calling setEnabled
an the action turns the button AND menu items to gray. I would simply
like to achieve that for the selected state as well: Whenever the user
clicks on a toolbar button OR menu item, the selected state shall be
reflected in the other GUI component, too. As stated above, a solution
is inside the "too new" JDK6.

So, has anybody implemented a solution for this? Maybe some
AbstractAction subclass?

Any help on this appreciated! (directions etc.)

TIA
Karsten