setOpaque(true); if (isSelected) { setBackground(table.getSelectionBackground()); setForeground(table.getSelectionForeground()); } else { setBackground(table.getBackground()); setForeground(table.getForeground()); }  setEnabled(table.isEnabled()); setFont(table.getFont());
  public Component getTableCellRendererComponent(JTable table, Object value,                                                 boolean isSelected,                                                 boolean hasFocus,                                                 int row, int column)  {    if (value!=null)      super.setText(value.toString());        return this;  }