Web browser embedded in java

Possible duplicate:
Is there a way to embed a browser in Java?

I am working on an application where I need to embed a web browser with the application. Any ideas on how to achieve it? Also can I interact with JavaScript from the code?

+3
source share
5 answers
+3
source

check Eclipse, it has a built-in browser that is user-configurable (they support multiple browsers).

you can possibly embed your browser even if you use the AWT application based on the AWT_SWT bridge, if you use the Java swing application.

this article can help you get started.

0
source

Check out Lobo

[Lobo] is an open source web browser that is completely written in Java. Lobo is actively developing with the goal of fully supporting HTML 4, Javascript, and CSS2. Lobo also supports direct JavaFX rendering.

0
source

For very simple pages, you can use the JEditorPane, which is in the Swing API: see the document

0
source

I'm afraid that embedding a real browser is your only option if you need JavaScript and AJAX, etc. check out the JavaXPCOM API to see how easy it is to embed FireFox. There is also a JDIC that allows you to embed IE in Windows environments. You will need some DLL files, but the procedure runs with both APIs and is well documented.

Let's say the JEditorPane is fine, but mostly for the HTML you control. I use it only to display HTML help files in my application. As soon as you start visiting sites, everything becomes unpleasant.

0
source

Source: https://habr.com/ru/post/1342689/


All Articles