As you can see in this picture all the characters are selected but I want it differently. I want it to act as a radio button, for example when I click one character all other characters should be deselected.
Asked
Active
Viewed 170 times
0
-
1You might put them in a `JList` with single selection enabled. Getting the horizontal layout is easy, but the exact layout and look might be tricky. – Andrew Thompson Nov 10 '16 at 10:56
-
1Also consider `JToggleButton` with `Icon` in a `ButtonGroup`, for [example](http://stackoverflow.com/a/22643334/230513). – trashgod Nov 10 '16 at 11:07
1 Answers
0
You can simply use a if statement to Disable or make all rest of the labels invisible as soon as any one of them is selected.

Nitin Kumar
- 9
- 8