Reputation: 1
How can I make my JRadioButton
enable/disable a JComboBox
in JFrame
?
Upvotes: 0
Views: 336
Reputation: 13686
if(radioButton.isSelected())
{
combo.setEnabled(true);
}
else
{
combo.setEnabled(false);
}
EDIT: Put this code in your event handler of JRadioButton
Upvotes: 2