i am working with java SE application, but i want to add a web view inside my application (or any other suggestion to view online web content inside JFrame) but it should work as good as web view, please guys help me out
-
If this is not a duplicate, please edit your question to include a [mcve] that shows your revised approach. – trashgod Sep 19 '16 at 18:41
-
thanks man, required answer was there thanks for helping me out – developer33 Sep 20 '16 at 18:22
3 Answers
There is a way to integrate JavaFX controls in Swing components, but AFAIK getting the details right such event handling etc. is a bit tricky.
http://docs.oracle.com/javase/8/javafx/interoperability-tutorial/fx_swing.htm#JFXIP561

- 37,247
- 13
- 80
- 152
Yes, you can. There is nice example at Oracle's site.
Thankfully to interaction WebEngine you can also customise interface, layout, tabs and much more. Here is a simple example how to load content into WebView:
final String url = "https://www.wikipedia.org/";
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load(url);

- 10,019
- 9
- 74
- 96
You can Use JScrollPane(JEditorPane) , you might want to look at That.
Or Try JxBrowser , JxBrowser can be used to display modern web pages and HTML+CSS+JavaScript content in your Java applications. It allows building GUI of your cross-desktop application using any popular HTML5 UI toolkit.
See this : http://java.dzone.com/articles/web-browser-your-java-swing.

- 96
- 4