@SuppressWarnings("null")
        private void updateSelectionState() {
            JCheckBox firstSelectedCheckBox = null;
            JCheckBox disabledCheckBox = null;
            int selectedCount = 0;
            for (JCheckBox checkBox : columnSelector.getButtons()) {
                if (checkBox.isSelected()) {
                    if (firstSelectedCheckBox == null) {
                        firstSelectedCheckBox = checkBox;
                    }
                    selectedCount++;
                }
                if (!checkBox.isEnabled()) {
                    disabledCheckBox = checkBox;
                }
            }

            if (selectedCount == 1) {
                firstSelectedCheckBox.setEnabled(false);
            } else if (disabledCheckBox != null) {
                disabledCheckBox.setEnabled(true);
            }
        }