Biblioteca Java - Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 mihai 1 /*
2  * SimpleBrowser.java
3  */
4 package lab.scd.net.browser_simple;
5  
6 /**
7  * Class created by @author Mihai HULEA at Feb 25, 2005.
8  *
9  * This class is part of the laborator2_net project.
10  *
11  */
12  
13 import javax.swing.*;
14  
15 import java.io.*;
16 import java.util.Properties;
17  
18 public class SimpleBrowser {
19  
20 public static void main(String[] args) {
21  
22     Properties props = System.getProperties();
23  
24     //eliminati comentariile in cazul in care folosti un proxy
25     /*
26     props.put("http.proxyHost","193.226.5.55");
27     props.put("http.proxyPort","3128");
28 */
29     // get the first URL
30         String initialPage = "http://google.com";
31         //if (args.length > 0) initialPage = args[0];
32         // set up the editor pane
33         JEditorPane jep = new JEditorPane( );
34         jep.setEditable(false);
35         jep.addHyperlinkListener(new LinkFollower(jep));
36  
37         try {
38             jep.setPage(initialPage);
39         }
40         catch (IOException e) {
41                 System.err.println("Usage: java SimpleWebBrowser url");
42                 System.err.println(e);
43                 System.exit(-1);
44         }
45  
46         // set up the window
47         JScrollPane scrollPane = new JScrollPane(jep);
48         JFrame f = new JFrame("Simple Web Browser");
49         f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
50         f.setContentPane(scrollPane);
51         f.setSize(512, 342);
52         f.setVisible(true);
53  
54         }
55 }