Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JComponent rendererComponent = (JComponent)myBaseRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (isSelected) { rendererComponent.setBackground(table.getSelectionBackground()); rendererComponent.setForeground(table.getSelectionForeground()); } else { final Color bg = table.getBackground(); rendererComponent.setBackground(bg); rendererComponent.setForeground(table.getForeground()); } rendererComponent.setOpaque(isSelected); return rendererComponent; }