Source of TestJEditorPane2.java


  1: //TestJEditorPane2.java

  3: import javax.swing.JEditorPane;
  4: import javax.swing.JScrollPane;
  5: import javax.swing.JFrame;
  6: import java.net.URL;

  8: public class TestJEditorPane2
  9: {
 10:     public static void main(String[] args)
 11:     {
 12:         JEditorPane jep = new JEditorPane();
 13:         try
 14:         {
 15:             JFrame jf = new JFrame("JEditorPaneTest");
 16:             jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 17:             jep.setPage("file:///home/csc46500/public/net/webpages/hello.html"); 
 18:             jf.add(jep);
 19:             jf.setSize(300, 200);
 20:             jf.setVisible(true);
 21:         }
 22:         catch (Exception e)
 23:         {
 24:         }
 25:     }
 26: }