private void setInvalid(@DialogMessage @Nullable String text, @Nullable JComponent component) {
    valid = isEmptyOrSpaces(text);
    setErrorText(text, component);
  }
private void setInvalid(@DialogMessage @Nullable String text, @Nullable JComponent component)