Not quite sure what you are trying to do. You could try a disable method in each button:-
Just be careful that there is no possibility of your setting up an endless loop, or your buttons will be going on and off like Christmas tree lights for the rest of the runtime of your application.
Have you tried putting buttons in ButtonGroups (javax.swing.ButtonGroup)? I have never tried it for ordinary buttons, but it works for radio buttons. If you activate one radio button, all the other buttons are automatically inactivated.
Any other suggestions, anybody else??
[edit]There are menu items in
Java which look like radio buttons. Look through the javax.swing API. I have never used them myself, but they might be what you are looking for.[/edit]
[ August 16, 2006: Message edited by: Campbell Ritchie ]