public void hyperlinkUpdate(HyperlinkEvent evt){
  JEditorPane c=getOutermostJEditorPane();
  if (c == null) {
    return;
  }
  if (!(evt instanceof HTMLFrameHyperlinkEvent)) {
    c.fireHyperlinkUpdate(evt);
    return;
  }
  HTMLFrameHyperlinkEvent e=(HTMLFrameHyperlinkEvent)evt;
  if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
    String target=e.getTarget();
    String postTarget=target;
    if (target.equals("_parent") && !inNestedFrameSet()) {
      target="_top";
    }
    if (evt instanceof FormSubmitEvent) {
      HTMLEditorKit kit=(HTMLEditorKit)c.getEditorKit();
      if (kit != null && kit.isAutoFormSubmission()) {
        if (target.equals("_top")) {
          try {
            movePostData(c,postTarget);
            c.setPage(e.getURL());
          }
 catch (          IOException ex) {
          }
        }
 else {
          HTMLDocument doc=(HTMLDocument)c.getDocument();
          doc.processHTMLFrameHyperlinkEvent(e);
        }
      }
 else {
        c.fireHyperlinkUpdate(evt);
      }
      return;
    }
    if (target.equals("_top")) {
      try {
        c.setPage(e.getURL());
      }
 catch (      IOException ex) {
      }
    }
    if (!c.isEditable()) {
      c.fireHyperlinkUpdate(new HTMLFrameHyperlinkEvent(c,e.getEventType(),e.getURL(),e.getDescription(),getElement(),e.getInputEvent(),target));
    }
  }
}

public void hyperlinkUpdate ( HyperlinkEvent evt ) { JEditorPane c = getOutermostJEditorPane ( ) ; if ( c == null ) { return ; } if ( ! ( evt instanceof HTMLFrameHyperlinkEvent ) ) { c . fireHyperlinkUpdate ( evt ) ; return ; } HTMLFrameHyperlinkEvent e = ( HTMLFrameHyperlinkEvent ) evt ; if ( e . getEventType ( ) == HyperlinkEvent . EventType . ACTIVATED ) { String target = e . getTarget ( ) ; String postTarget = target ; if ( target . equals ( "_parent" ) && ! inNestedFrameSet ( ) ) { target = "_top" ; } if ( evt instanceof FormSubmitEvent ) { HTMLEditorKit kit = ( HTMLEditorKit ) c . getEditorKit ( ) ; if ( kit != null && kit . isAutoFormSubmission ( ) ) { if ( target . equals ( "_top" ) ) { try { movePostData ( c , postTarget ) ; c . setPage ( e . getURL ( ) ) ; } catch ( IOException ex ) { } } else { HTMLDocument doc = ( HTMLDocument ) c . getDocument ( ) ; doc . processHTMLFrameHyperlinkEvent ( e ) ; } } else { c . fireHyperlinkUpdate ( evt ) ; } return ; } if ( target . equals ( "_top" ) ) { try { c . setPage ( e . getURL ( ) ) ; } catch ( IOException ex ) { } } if ( ! c . isEditable ( ) ) { c . fireHyperlinkUpdate ( new HTMLFrameHyperlinkEvent ( c , e . getEventType ( ) , e . getURL ( ) , e . getDescription ( ) , getElement ( ) , e . getInputEvent ( ) , target ) ) ; } } }
notification of a change relative to a hyperlink . this method searches for the outermost jeditorpane , and then fires an htmlframehyperlinkevent to that frame . in addition , if the target is _parent , and there is not nested framesets then the target is reset to _top . if the target is _top , in addition to firing the event to the outermost jeditorpane , this method also invokes the setpage ( ) method and explicitly replaces the current document with the destination url .
