JLabel (@NotNull Supplier<? extends JBLabel> labelSupplier, @Nullable @NlsContexts.DetailedDescription String commentText, boolean isCommentBelow, int maxLineLength, boolean allowAutoWrapping) { // todo why our JBLabel cannot render html if render panel without frame (test only) boolean isCopyable = SystemProperties.getBooleanProperty("idea.ui.comment.copyable", true); JLabel component = labelSupplier.get().setCopyable(isCopyable).setAllowAutoWrapping(allowAutoWrapping); component.setVerticalTextPosition(SwingConstants.TOP); component.setFocusable(false); if (isCopyable) { setCommentText(component, commentText, isCommentBelow, maxLineLength); } else { component.setText(commentText); } return component; }