private void validateSelectedTarget() {
    Object selected = getSelectedItem();
    boolean hasErrors = false;
    if (selected instanceof SavedTarget target) {
      target.revalidateConfiguration();
      hasErrors = target.hasErrors();
    }
    putClientProperty("JComponent.outline", hasErrors ? "error" : null);
  }
private void validateSelectedTarget()