it returns javax.swing.DefaultListSelectionModel instead of the name of the table as I expected.
So does this mean I need to use different models for the tables?
at the start of my valuechaged method
Martin Vajsar wrote:
just a hint, thought this is not what you asked about: if you redefine the getColumnClass() method of your DefaultTableModel subclass to return String and Boolean for first and second columns respectively, you can remove your CustomCellRenderer. JTable will render checkboxes and handle their editing automatically. The default implementation is more efficient actually, as it does not create a new instance of checkbox for every rendered cell.
Colin McTaggart wrote:Just so I know what I'm trying to do, do you mean that I need to create my own custom getColumnClass and extend it in order to customize it? I really need to sort this as it seems to be causing a big hit on performance.