Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: writting to jeditorpane

  1. #1
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default writting to jeditorpane

    JEditorPane t = new JEditorPane()];
    URL test= new URL("www.wikipedia.org");
    t.setPage(test);

    it generates the following error:

    java.net.MalformedURLException: no protocol: Wikipedia
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at test.test.main(test.java:15)
    java.io.IOException: invalid url
    at javax.swing.JEditorPane.setPage(Unknown Source)
    at test.test.main(test.java:21)


  2. #2
    Junior Member ordinarypeople's Avatar
    Join Date
    Apr 2010
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: writting to jeditorpane

    JEditorPane t = new JEditorPane()];
    [B]URL test= new URL("http://www.wikipedia.org");[/B]
    t.setPage(test);
    Uncaught exception: MYBRAIN.lang.NullPointerException 0.

  3. The Following User Says Thank You to ordinarypeople For This Useful Post:

    nasi (April 5th, 2010)

  4. #3
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default Re: writting to jeditorpane

    thanks, sorry for this stupid thread

Similar Threads

  1. create buttons in a JEditorPane
    By seeker in forum AWT / Java Swing
    Replies: 4
    Last Post: December 5th, 2009, 09:01 AM
  2. Convert contents of JTextArea / JEditorPane to PDF
    By rangarajank in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: September 30th, 2009, 02:38 PM

Tags for this Thread