This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Problem with Checkbox and CheckboxGroup? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with Checkbox and CheckboxGroup?" Watch "Problem with Checkbox and CheckboxGroup?" New topic

Problem with Checkbox and CheckboxGroup?

Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
Hello all,

The code below display a button and 3 option (radio) buttons. The program must uncheck the selected radio button when the button is clicked. Actually nothing happens in this code, that is the selected radio button has no change. Can anyone give a helping hand.


Best regards,<br /> <br />vanchin
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
According to the api there will always be one checkbox in the CheckboxGroup selected. The usual way to be able to have no selections is to add another checkbox to the group but do not display it in your gui. When you want to have no selections you can select the extra checkbox.
subject: Problem with Checkbox and CheckboxGroup?
It's not a secret anymore!