posted 20 years ago
Then use your TableCellRenderer component, with its Background color is table's Background and Foreground color to table's Foreground.
class CustomRenderer extends JLabel implements TableCellRenderer
{
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
{
setBackground(table.getBackground());
setForeground(table.getForeground());
return this;
}
}