code: private void buttonBrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBrowseActionPerformed
      final String selectedText = this.editorPane.getSelectedText().trim();
      try {
        UiUtils.browseURI(URI.create(selectedText), false);
      } catch (Exception ex) {
        LOGGER.error("Can't open link : " + selectedText); //NOI18N
        DialogProviderManager.getInstance().getDialogProvider().msgError(Main.getApplicationFrame(), "Can't browse link : " + selectedText);
      }
    }
docs: GEN-LAST:event_buttonClearActionPerformed