private void reflectSelectionInButton(AbstractButton btn, boolean selected) {
        if (btn != null) {
            if (btn.isSelected() != selected) {
                btn.setSelected(selected);
            }

            btn.setBorder(
                    selected ?
                            BorderFactory.createLoweredBevelBorder() :
                            BorderFactory.createEmptyBorder());
        }
    }