Here you can find the source of isRadioButtonSelected(JRadioButton radioButton)
Parameter | Description |
---|---|
radioButton | a parameter |
public static boolean isRadioButtonSelected(JRadioButton radioButton)
//package com.java2s; //License from project: Open Source License import javax.swing.DefaultButtonModel; import javax.swing.JRadioButton; public class Main { /**/*ww w .ja va2 s. c om*/ * Determines if radio button is selected. * * @param radioButton * @return */ public static boolean isRadioButtonSelected(JRadioButton radioButton) { DefaultButtonModel model = (DefaultButtonModel) radioButton.getModel(); return model.getGroup().isSelected(model); } }