private static JComponent createColoredComponent(@NlsContexts.Label String mainText, @Nls String errorText, boolean hasError) {
    SimpleColoredComponent component = new SimpleColoredComponent();
    if (hasError) {
      component.append(mainText + " (" + errorText + ")", new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, JBColor.RED));
    } else {
      component.append(mainText);
    }
    return component;
  }
private static JComponent createColoredComponent(@NlsContexts.Label String mainText, @Nls String errorText, boolean hasError)