I have a JTable with numbers. I know how to change color of one cell or all cells. But how to change color of cell in and animate it ? For example, The first cell of red, there is a delay, and the second cell is painted in the same red color and so on.
I inherited class DefaultTableCellRenderer
class paintCell extends DefaultTableCellRenderer {
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
Component c = super.getTableCellRendererComponent(table, value,
isSelected, hasFocus, row, column);
return c;
}
}
And set method table.setDefaultRenderer(Object.class, new paintCell());