code: protected void loadPage(JEditorPane pane, HyperlinkEvent evt)
      {
          // if some security, or other interaction is needed, override this
          // method
          try
          {
              pane.setPage(evt.getURL());
          } catch (IOException e)
          {
              System.err.println(e.getLocalizedMessage());
          }
      }
docs: Loads given page as HyperlinkEvent.
  
  @param pane
  the pane
  @param evt
  the event