JRadioButton: getModel() : JRadioButton « javax.swing « Java by API
- Java by API
- javax.swing
- JRadioButton
JRadioButton: getModel()
import javax.swing.ButtonGroup;
import javax.swing.ButtonModel;
import javax.swing.JRadioButton;
public class Main {
public static void main(String[] argv) throws Exception {
JRadioButton radioButton = new JRadioButton();
ButtonGroup group = new ButtonGroup();
ButtonModel model = radioButton.getModel();
group.setSelected(model, true);
}
}
Related examples in the same category