boolean (@Nullable ValidationInfo info) { if (info == null && validationInfo != null) return true; else if (info != null && validationInfo != null) { if (info.warning != validationInfo.warning) return true; if (tipComponent != null && !Objects.equals(info.message, validationInfo.message)) { String message = HtmlChunk.div().attr("width", MAX_WIDTH.get()).addRaw(trimMessage(info.message, tipComponent)). wrapWith(HtmlChunk.html()).toString(); View v = BasicHTML.createHTMLView(tipComponent, message); Dimension size = tipComponent.getPreferredSize(); JBInsets.removeFrom(size, tipComponent.getInsets()); if (v.getPreferredSpan(View.Y_AXIS) != size.height) return true; } } return false; }