Biblioteca Java - Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 mihai 1 /*
2  * LinkFolower.java
3  */
4 package lab.scd.net.browser_simple;
5  
6 import javax.swing.JEditorPane;
7 import javax.swing.event.HyperlinkEvent;
8 import javax.swing.event.HyperlinkListener;
9  
10 /**
11  * Class created by @author Mihai HULEA at Feb 25, 2005.
12  *
13  * This class is part of the laborator2_net project.
14  *
15  */
16 public class LinkFollower implements HyperlinkListener {
17  
18     private JEditorPane pane;
19     public LinkFollower(JEditorPane pane) {
20     this.pane = pane;
21     }
22     public void hyperlinkUpdate(HyperlinkEvent evt) {
23     if (evt.getEventType( ) == HyperlinkEvent.EventType.ACTIVATED) {
24     try {
25         pane.setPage(evt.getURL( ));
26     }
27     catch (Exception e) {
28     }
29     }
30  
31     }
32  
33 }