Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1534

Re: java.net.ConnectExcep

From "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Subject Re: java.net.ConnectExcep
Message-ID <713b8b9fea30b@uwe> (permalink)
Newsgroups comp.lang.java.gui
References <1177502594.380781.33900@n15g2000prd.googlegroups.com>
Date 2011-04-27 15:33 +0000
Organization TDS.net

Show all headers | View raw


  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

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

java.net.ConnectException "Srik" <srik@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
  Re: java.net.ConnectExcep "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000
    Re: java.net.ConnectExcep "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:33 +0000

csiph-web