wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes To display webpage in JEditorpane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "To display webpage in JEditorpane" Watch "To display webpage in JEditorpane" New topic
Author

To display webpage in JEditorpane

Deepak Kamboj
Greenhorn

Joined: Jun 19, 2000
Posts: 7
Hi Shin!
I am making a webbrowser in java using JEditorpane. The program displays a page in JEditopane but there is some problems. Firstly it doesnot display webpage as it looks in IE or Netscape Navigator. i.e. the image is aligned right in HTML code. but it displays it in left. If a heading is alignrd left it displays it in center. So please suggest me what I can do ?
With regards,
Deepak Kamboj
NILESH PATEL
Ranch Hand

Joined: Nov 21, 2000
Posts: 71
Hi
I have faced similar problem with not quite the web page, but I created a document in a word with links and stuff then saved into an html file. then I tried to load that html doc in JEditor pane, the display was nowhere near to the one in IE, Opera or so on. Later I found out this was due to the way somw html docs have style features associated with it for which there is no support in using JEditorPane. In fact you can do only very basic with Jeditorpane when we deal with html files. I hope it improves in the near future, otherwise we will have to reply on invoking IE or netscape or opera, whatever is istalled on local computer to display html pages.
My personal suggestion to you would be, if suitable to you of course, is use one of the readily available class to invoke IE from underlying system and then go from ther, forget about java-html browser for time being. Even if you find oure java-html browser with full support, it will be dead slow.
However its been about six months since I looked around for this kind of stuff, so if you find better solution please let me know.
Thanks
Nilesh
 
wood burning stoves
 
subject: To display webpage in JEditorpane