JPanel (@NotNull @Nls String text, boolean isError) { final JLabel label = new JLabel(XmlStringUtil.wrapInHtml(escapeXmlAndAddBr(text))); label.setForeground(isError ? SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor() : NamedColorUtil.getInactiveTextColor()); final JPanel wrapper = new JPanel(new GridBagLayout()); wrapper.add(label, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, JBUI.insets(1), 0, 0)); return wrapper; }