This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 3064
    
  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: 10167
    
    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!]
 
It is sorta covered in the JavaRanch Style Guide.
 
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