JComponent () { var viewer = SwingHelper.createHtmlViewer(true, null, JBColor.WHITE, JBColor.BLACK); viewer.setFocusable(true); viewer.addHyperlinkListener(new BrowserHyperlinkListener()); viewer.setText(licenseText); var styleSheet = ((HTMLDocument)viewer.getDocument()).getStyleSheet(); styleSheet.addRule("body {font-family: \"Segoe UI\", Tahoma, \"Helvetica Neue\", Helvetica, Arial, sans-serif;}"); styleSheet.addRule("body {margin-top:0;padding-top:0;}"); styleSheet.addRule("body {font-size:" + JBUIScale.scaleFontSize((float)14) + "pt;}"); viewer.setCaretPosition(0); viewer.setBorder(JBUI.Borders.empty(0, 5, 5, 5)); var scrollPane = new JBScrollPane(viewer, VERTICAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER); var centerPanel = new JPanel(new BorderLayout(JBUIScale.scale(5), JBUIScale.scale(5))); centerPanel.add(scrollPane, BorderLayout.CENTER); return centerPanel; }