Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems displaying URLs in JEditorPane  RSS feed

 
Sammy Bill
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a JeditorPane that displays URLs based on a HyperLinkEvent. But the pages are displayed completely different than what you can see in a brower. ( looks like it displays the page with no stylesheets).

How can i make a JEditorPane displayes pages like if it was a browser.

Thanks
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JEditorPane only supports HTML 3.2. It does not support JavaScript. In other words it will never look like what you see in a "real" browser.

If you need a real browser you can use the Desktop API.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the Lobo project. It is a pluggable browser written in swing, and it just might do what you require.
Note: I haven't used it myself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!