How can I make my JRadioButton
enable/di开发者_开发知识库sable a JComboBox
in JFrame
?
if(radioButton.isSelected())
{
combo.setEnabled(true);
}
else
{
combo.setEnabled(false);
}
EDIT: Put this code in your event handler of JRadioButton
How can I make my JRadioButton
enable/di开发者_开发知识库sable a JComboBox
in JFrame
?
if(radioButton.isSelected())
{
combo.setEnabled(true);
}
else
{
combo.setEnabled(false);
}
EDIT: Put this code in your event handler of JRadioButton
精彩评论