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 JavaFX and the fly likes Open Web pages inside JavaFX  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 » JavaFX
Bookmark "Open Web pages inside JavaFX  " Watch "Open Web pages inside JavaFX  " New topic

Open Web pages inside JavaFX

Ksh Aggarwal

Joined: Sep 16, 2009
Posts: 28

Im trying to open web pages in a javafx window. For reference i am using the following link ( where the author has shown a map inside javaFX window.

I am modifying the code to use a JPanel instead on JXMapViewer.
I have tried both JEditorPane

String google = "";
JEditorPane pane;

try {
pane= new JEditorPane(google);

and the JDIC library

final WebBrowser webBrowser = new WebBrowser();
//webBrowser.setURL(new URL("file://D:\\test.html"));
webBrowser.setURL(new URL(""));
} catch (MalformedURLException e) {

to open simple local html files and but they are never shown in the javaFX window. Adding a JLabel to the panel works and is shown. Putting text in the JEditorPane also works, but not a URL.

Please Help
subject: Open Web pages inside JavaFX
Similar Threads
Link to open using JEditor Pane
opening link in new window
Open a Web Page inside a jDesktopPane
Open HTML file in desktop app
How to make a JavaBrowser