int (int lines) { String word = IdeBundle.message("notification.manager.content.height.word"); String lineBreak = IdeBundle.message("notification.manager.content.height.linebreak"); String content = word + StringUtil.repeat(lineBreak + word, lines - 1); JEditorPane text = new JEditorPane(); text.setEditorKit(HTMLEditorKitBuilder.simple()); text.setText(NotificationsUtil.buildHtml(null, null, false, content, null, null, null, NotificationsUtil.getFontStyle())); text.setEditable(false); text.setOpaque(false); text.setBorder(null); return text.getPreferredSize().height; }