void (@NlsContexts.DialogMessage String message, boolean isWarning) { myTextField.putClientProperty("JComponent.outline", message != null ? (isWarning ? "warning" : "error") : null); if (myErrorPopup != null && !myErrorPopup.isDisposed()) Disposer.dispose(myErrorPopup); if (message == null) return; ValidationInfo validationInfo = new ValidationInfo(message, myTextField); if (isWarning) { validationInfo.asWarning(); } ComponentPopupBuilder popupBuilder = ComponentValidator.createPopupBuilder(validationInfo, errorHint -> { Insets insets = myTextField.getInsets(); Dimension hintSize = errorHint.getPreferredSize(); Point point = new Point(0, insets.top - JBUIScale.scale(6) - hintSize.height); myErrorShowPoint = new RelativePoint(myTextField, point); }).setCancelOnWindowDeactivation(false) .setCancelOnClickOutside(true); myErrorPopup = popupBuilder.createPopup(); myErrorPopup.show(myErrorShowPoint); }