This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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.
It is sorta covered in the JavaRanch Style Guide.
subject: Problem with Checkbox and CheckboxGroup?
Similar Threads
Killing...removing object
Changing Labels on an Checkbox Group
why do the two errors come out?
Found Bug in Java !!!!..Please Check this..