This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JRadioButton  RSS feed

 
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: 949
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
Boost this thread!