DefaultCellEditor () { return new DefaultCellEditor(new JCheckBox()) { { ((JCheckBox)getComponent()).setHorizontalAlignment(SwingConstants.CENTER); } @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { Component component = super.getTableCellEditorComponent(table, value, isSelected, row, column); component.setBackground(isSelected ? table.getSelectionBackground() : table.getBackground()); return component; } }; }