Possible Duplicate:
How can I put a control in the JTableHeader of a JTable?
I am trying to create a table that contains columns which has a checkbox that can be toggled. I followed the code example from here but it becomes progressively unresponsive if the columns are dynamically added and removed in the duration of the application.
I added additionally code to remove the listeners from the JTableHeader before removing the columns but this did not make a difference. I am trying to adapt the code example to only have the one mouse listener for the whole header and not for each column but not having much success.
Is it possible to do this? Is there a better way to add checkbox to the header column header?
Thanks