So you answered a question other than the one asked. That must have been helpful!
db
Type: Posts; User: Darryl.Burke
So you answered a question other than the one asked. That must have been helpful!
db
The question was about clearing the selection in a ButtonGroup, not about removing components from a visible GUI.
db
Chances are you have more than one variable with the same name: the one an instance field, the other a method local variable that hides it.
To get better help sooner, post a SSCCE. <== link
db
That's just ... silly. The if statement requires a boolean condition, which isSelected() already returns.
It is NEVER required to compare a boolean with true or false.
db