Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To display webpage in JEditorpane

 
Deepak Kamboj
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic