This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
which will return the specific actionCommand() of the radioButton (if set), but then you'd probably test the return in a bunch of if's anyway, so you're no better off.
if you have actionListeners added to each radioButton, another option might be to create a class field JRadioButton selection; and in actionPerformed() include selection = (JRadioButton)actionEvent.getSource();
Joined: Feb 08, 2004
your idea sounds good, Michael before i read your post i wrote: