i need to make this table with all format and component = to another table
JTable table = new JTable(model) {
@Override
public Component prepareRenderer(TableCellRenderer renderer,
int row, int col) {
Component c = super.prepareRenderer(renderer, row, col);
if (col == 2) {
String SeeMe = (String) jTable1.getValueAt(row, 2);
if (SeeMe.equals("0")) {
c.setBackground(Color.white);
c.setForeground(Color.red);
}
} else {
c.setForeground(Color.black);
c.setBackground(Color.white);
}
return c;
}
};
this table have a component and this what i need to applay it to my second table