This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JRadioButton

 
Tyson Lindner
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I deselect JRadioButtons? Method setSelected(false) is not working. Basically I want a user to be able to choose only one name between two, but can also choose neither name (by leaving the buttons deselected).
 
Brian Cole
Author
Ranch Hand
Posts: 903
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presuming you're using a ButtonGroup, call ButtonGroup.clearSelection().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic