decob
asked on
ButtonGroup question..
I have 5 x 5 radio button, the columns are in a button group, is it possible to have the columns in another button group where each button is a member of two groups?
ppl
A 1 2 3 4 5
B 1 2 3 4 5
C 1 2 3 4 5
D 1 2 3 4 5
E 1 2 3 4 5
In simple terms, no two rows (people A -> e) can have the same column value.
ppl
A 1 2 3 4 5
B 1 2 3 4 5
C 1 2 3 4 5
D 1 2 3 4 5
E 1 2 3 4 5
In simple terms, no two rows (people A -> e) can have the same column value.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why not have 5 button groups, one for each column?
Are you using AWT? With AWT is this not possible, in this case you must implement listener and to code the behavior by yourself.
I think Swing is here more powerful. Have a look at java.swing.JRadiobutton and java.swing.ButtonGroup. You can add JButton's to the ButtonGroup. All JButtons in a ButtonGroup build an own Column. So theoretical, you can add a JButton to two different Groups, but I have never tried this.
Hope this helps.
Regards
Mark