if (isSelected) { checkBox.setBackground(table.getSelectionBackground()); checkBox.setForeground(table.getSelectionForeground()); } else { checkBox.setBackground(table.getBackground()); checkBox.setForeground(table.getForeground()); }  if (hasFocus) { checkBox.setBorder( UIManager.getBorder("Table.focusCellHighlightBorder")); if (table.isCellEditable(row, column)) { checkBox.setBackground( UIManager.getColor("Table.focusCellBackground")); checkBox.setForeground( UIManager.getColor("Table.focusCellForeground")); } } else checkBox.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
    public Component getTableCellRendererComponent(JTable table, Object value,                                                   boolean isSelected,                                                   boolean hasFocus, int row,                                                   int column)    {      // Null is rendered as false.      if (value == null)        checkBox.setSelected(false);      else        {      Boolean boolValue = (Boolean) value;      checkBox.setSelected(boolValue.booleanValue());        }      return checkBox;    }