Mike
Mike

Reputation: 1

How to make JRadioButtons change properties (JFrame)?

How can I make my JRadioButton enable/disable a JComboBox in JFrame?

Upvotes: 0

Views: 336

Answers (1)

Umesh Kacha
Umesh Kacha

Reputation: 13686

if(radioButton.isSelected())
{
   combo.setEnabled(true);
}
else
{
   combo.setEnabled(false);
}

EDIT: Put this code in your event handler of JRadioButton

Upvotes: 2

Related Questions