This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have 2 JRadioButtons which I add to a JRadioGroup. Initially both radiobuttons are not selected. I have a JButton also.When the user selects a radioButton & presses the JButton I want both the radiobuttons to be not selected.I tried to do this by using JRadioButton.setSelected(false).But this is not working. Please help.. Thanx, Shanthala
The problem lays with the ButtonGroup. Once you add your JRadioButton(s) into the ButtonGroup, the ButtonGroup will MAKE SURE that once it selected that there will always one that is selected. So to clear your JRadioButton you need to do: