JEditorPane (@NotNull JEditorPane myEditorPane) { String message = StringUtil.join(this.getText(), "<br>"); myEditorPane.setEditable(false); myEditorPane.setOpaque(false); myEditorPane.setEditorKit(HTMLEditorKitBuilder.simple()); myEditorPane.setHighlighter(null); final StyleSheet styleSheet = ((HTMLDocument)myEditorPane.getDocument()).getStyleSheet(); final Style style = styleSheet.addStyle(MSG_STYLE, null); styleSheet.addStyle(LINK_STYLE, style); myEditorPane.setText(message); return myEditorPane; }