Place a working checkbox in a JTable header.
I have a need (well, mostly aesthetic, so other solutions might work out fine too) to place working comboboxes within the header of a JTable.
This far I managed to create a custom renderer, so I can place even a whole JPanel (containing a checkbox) inside a certain cell of the TableHeader.
The problem right now, though, is that such checkbox, will not really get any input (ie. I can't set it to selected/checked). I suppose that might be as the header's own mouselisteners take over the checkbox ones.
I thought of just stripping off the header's mouselistener, and re-adding some for the checkbox itself, but I can't really find out how to access the checkbox living inside the header :(
Would anyone be so nice as to point me in the right direction from here?
If this is not the right direction at all, what could also help, is some hint on how I could place components, such as checkboxes, on TOP of a tableheader, meaning, render the checboxes in the foreground and have the tableheader stay in the background, which this far I didn't manage to do.
This said, I'm using absolute layout for the panel that contains all of the above.
This is my first post, so, sorry if my description is insufficient or lame, if that's the case I'll try and do better next time :).