FileDocCategorySizeDatePackage
LinkFollower.javaAPI DocExample528Sun Dec 12 10:52:38 GMT 2004None

LinkFollower

public class LinkFollower extends Object implements HyperlinkListener

Fields Summary
private JEditorPane
pane
Constructors Summary
public LinkFollower(JEditorPane pane)

    this.pane = pane;
  
Methods Summary
public voidhyperlinkUpdate(javax.swing.event.HyperlinkEvent evt)

    
    if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
      try {
        pane.setPage(evt.getURL());        
      }
      catch (Exception ex) {
        pane.setText("<html>Could not load " + evt.getURL() + "</html>");
      } 
    }