HyperlinkLabel (@NlsContexts.LinkLabel @NotNull String text, @NotNull String url) { HyperlinkLabel hyperlink = new HyperlinkLabel(text); hyperlink.setHyperlinkTarget(url); DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.add(new OpenLinkInBrowser(url)); actionGroup.add(new CopyLinkAction(url)); hyperlink.setComponentPopupMenu(ActionManager.getInstance().createActionPopupMenu("web hyperlink", actionGroup).getComponent()); return hyperlink; }