Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Andrew Thompson" Subject: Re: java.net.ConnectExcep Message-ID: <713b8b9fea30b@uwe> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1177502594.380781.33900@n15g2000prd.googlegroups.com> References: <1177502594.380781.33900@n15g2000prd.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 50 Date: Wed, 27 Apr 2011 15:33:53 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918433 96.60.20.240 (Wed, 27 Apr 2011 10:33:53 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:33:53 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1534 To: comp.lang.java.gui Srik wrote: >When i run the following code, i get - java.net.ConnectException: >Connection refused Do you? I get different results. I get java.net.MalformedURLException: no protocol: www.google.co.in Which is largely due to this.. .. > public void hyperlinkUpdate(HyperlinkEvent e) { > System.out.println("hyper link update"); .. > } else { > try { > pane.setPage(e.getURL().getHost()); That line should be .. pane.setPage(e.getURL()); By the way. Please.. - Don't include 'tab' characters in source posted to usenet. - Always capitalise the word 'I'. Another couple of points are that disalog.show(); .has been deprecated. Try instead.. disalog.setVisible(true); You might try setting the JEditorPane into a JPanel and calling setPreferredSize() on the JPanel, so the GUI does not become compacted down to a title bar. You should call pack() or validate() before setting the GUI visible. HTH -- Andrew Thompson http://www.athompson.info/andrew/ Message posted via JavaKB.com http://www.javakb.com/Uwe/Forums.aspx/java-gui/200704/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24