Get values from JTable cell with multiple CellRenderer

134 views Asked by At

I have JTable that uses CellRenderer and CellEditor and works fine but my problem is that when I fire a loof function to get the values edited of each row I get the same value for all rows which is the last edited value:

See this picture:

enter image description here


and this is how I get the values:

FillPointageCellEditorRenderer r = (FillPointageCellEditorRenderer) pTablePointage.getCellEditor(i, 2);

CompPointageCell object = (CompPointageCell) r.getCellEditorValue();
String hs = object.hs;
int chantier = object.selectedChantier;
int activity = object.selectedActivity;

FillPointageCellEditorRenderer: the class that implements TableCellRenderer and TableCellEditor.
how can I get the edited value of each row ?

0

There are 0 answers