Selecting a JRadioButton Component in a Button Group
// To create a radio button and button group,
// see Creating a JRadioButton Component
// Select the radio button; the currently selected radio button is deselected.
// This operation does not cause any action events to be fired.
ButtonModel model = radioButton.getModel();
group.setSelected(model, true);
Post a comment