| Author |
JTable with RadioButton Headers
|
jefff willis
Ranch Hand
Joined: Sep 29, 2004
Posts: 113
|
|
I've seen examples of JTables with push button header examples. They work well enough but I could really use a RadioButton header. Has anyone ever don't anything like that? I'm including some code that I use for a push button header. I've tried to adapt a RadioButton header from this code but I have had much luck.
|
 |
Tim McGuire
Ranch Hand
Joined: Apr 30, 2003
Posts: 819
|
|
I got radio buttons to show up in your table headers by having it extend JRadioButton instead of JButton: You will need change the listener to work better with radio buttons.
|
 |
jefff willis
Ranch Hand
Joined: Sep 29, 2004
Posts: 113
|
|
Thanks Tim, Thanks for the help. My problem with the RadioButton example is that I can't seem to get them to "group." When I press Column 1 for example, I want the other columns to be un-selected. I'm in the process of implementing that in my mouse listener, but I was kind of hoping that the SWING components would do this for me.
|
 |
 |
|
|
subject: JTable with RadioButton Headers
|
|
|