>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

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Andrew Thompson - 25 Apr 2007 14:36 GMT
...
>Another couple of points are that
...
Oh, and JEditorPane is entirely unsuited to displaying
web pages that are not directly controlled and carefully
optimised by you, to account for the limitations of this
component.

Signature
Andrew Thompson
http://www.athompson.info/andrew/