JEditorPane editor = (JEditorPane) e.getSource(); if (! editor.isEditable() && SwingUtilities.isLeftMouseButton(e)) { Point loc = e.getPoint(); int pos = editor.viewToModel(loc); if (pos >= 0) activateLink(pos, editor, e.getX(), e.getY()); }
      public void mouseClicked(MouseEvent e)      {        /*         These MouseInputAdapter methods generate mouse appropriate events around         hyperlinks (entering, exiting, and activating).         */        // FIXME: Not implemented.      }