Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Leon Hansen   on Jan 13 In Java Category.

  
Question Answered By: Clarence Nichols   on Jan 13

ButtonGroup Class , like this

JRadioButton birdButton = new JRadioButton("bird");
JRadioButton catButton = new JRadioButton("cat");
ButtonGroup group = new ButtonGroup();
group.add(birdButton);
group.add(catButton);
birdButton.setSelected(true);

at the same time just one of the catButton or birdButton can be selected

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on GUI problem Or get search suggestion and latest updates.


Tagged: