I've added a JToggleButton to a ButtonGroup.
Then I can't unselect this ToggleButton by clicking it one more time anymore.
I'm pretty sure that JToggleButton can be unselected by clicking it.
Is there any simple way to let the Button works as normal?
The Basic ButtonGroup works fine(Click B and unselect A).
But what i want is when A is selected and can be unselected by clicking it one more time.
In short,I want Both situations work.
A selected--> click B --> A unselected
A selected--> click A --> A unselected (Normal JToggleButton)