I need to use two JRadioButtons (already set up the ButtonGroup) to determine which of two Objects will be worked with.
savingsButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
AbstractButton aButton = (AbstractButton) e.getSource();
if (aButton == savingsButton) {
//set the target Object to savingsAccount
}
}
});
The other ActionListener is identical, save for swapping checkingAccount for savingsAccount.
How can I accomplish this?