the problem seems to be realted to the TableModel. Once I use a DefaultTableModel it works perfect
The method below would appear to be the problem.
public void setData (List<Leiheintrag> list)
{
lendlist = list;
this.fireTableStructureChanged();
this.fireTableDataChanged();
}
When you invoke fireTableStructureChange()
the JTable will recreate the TableColumnModel (and all the TableColumns) which means your renderer will no longer be associated with TableColumn 3.
I think you can just use the fireTableDataChanged()
, or if that doesn't work then use fireTableRowsInserted()
.
If you want you can take a look at the source code of the DefaultTableModel
to see what the setDataVector()
method invokes because the concept is the same for both models.