Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes display web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "display web page" Watch "display web page" New topic
Author

display web page

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

Hi friends,

i am developing a browser application using swing as a GUI. I am using the JEditorPane class of java api to display a webpage.

code is like





The problem is the JEditorPane class could not do it properly like it increase or decrease the font text of web page, does not place the components where they are place on a URL etc.



How can display a web page properly??

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

Just a suggestion: You can try the Web Viewer component of JavaFX 2. So you can embed JavaFX components in your Swing application. There are tutorials for these at http://www.javafx.com

Mohamed Sanaulla | My Blog
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

JEditorPane has HTML 3.2 support. To render "modern" websites, you might want to evaluate something like the lobo browser


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
jQuery in Action, 2nd edition
 
subject: display web page
 
Similar Threads
setText doesn't display html!
JEditorPane problem displaying non-English text in 1.4 (Linux)
retrieving string from a webpage
How to make a JavaBrowser
Loading Webpage in JFrame