JComponent () { String warningText = new HtmlBuilder() .appendRaw(GitBundle.message("text.crlf.fix.dialog.description.warning", HtmlChunk.text(ATTRIBUTE_KEY).code(), HtmlChunk.text(RECOMMENDED_VALUE).code())) .wrapWithHtmlBody().toString(); String proposedFixText = new HtmlBuilder() .appendRaw(GitBundle.message("text.crlf.fix.dialog.description.proposed.fix", HtmlChunk.text(SUGGESTED_FIX).code())) .wrapWithHtmlBody().toString(); JLabel icon = new JLabel(UIUtil.getWarningIcon(), SwingConstants.LEFT); myDontWarn = new JBCheckBox(GitBundle.message("checkbox.dont.warn.again")); JPanel rootPanel = new JPanel(new GridBagLayout()); GridBag g = new GridBag() .setDefaultInsets(new Insets(0, 6, DEFAULT_VGAP, DEFAULT_HGAP)) .setDefaultAnchor(GridBagConstraints.LINE_START) .setDefaultFill(GridBagConstraints.HORIZONTAL); rootPanel.add(icon, g.nextLine().next().coverColumn(4)); rootPanel.add(new JBLabel(warningText), g.next()); rootPanel.add(new JBLabel(proposedFixText), g.nextLine().next().next().pady(DEFAULT_HGAP)); rootPanel.add(myDontWarn, g.nextLine().next().next().insets(0, 0, 0, 0)); return rootPanel; }