Right now I have this code
jTable1.getColumn("Progress").setCellRenderer(new TableCellRenderer() {
@Override
public Component getTableCellRendererComponent(JTable arg0, Object arg1,
boolean arg2, boolean arg3, int arg4, int arg5) {
// TODO Auto-generated method stub
return new JProgressBar();
}
});
and I want to update it's progress as it keeps going, but of course this code doesn't work.
So I change it to this.
jTable1.getColumn("Progress").setCellRenderer(new TableCellRenderer() {
@Override
public Component getTableCellRendererComponent(JTable arg0, Object arg1,
boolean arg2, boolean arg3, int arg4, int arg5) {
// TODO Auto-generated method stub
JProgressBar bar2 = bar; //where bar is another JProgressBar being updated outside.
return bar2;
}
});
This code works, but the problem is, when there is multiple rows, their columns all update to the same value, which is not what I want.
I want to be able to update the indiviual row's JProgressBar, but how do I do that?