Possible Duplicate:
Is there a way to embed a browser in Java?
How can I embed a browser in a Java based desktop application? Can I communicate with the embedded browser directly (not via localhost)... such as loading html text, capturing onclick events, getting form values?
Thanks
check out Eclipse, it has an embedded browser which is configurable by the user (they support multiple browsers).
you can probably embed their browser even if you use an AWT based application using the AWT_SWT bridge.
this article may help you get started.
Swing JEditor pane is able to display HTML.
Check http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JEditorPane.html
Also here in SO is a more detailed answer to this topic:
https://stackoverflow.com/questions/48249/java-embedding-a-web-browser-pane
You can build a very primitive browser using JEditorPane. You can listen to Hyperlink events, but javascript or getting form values isn't possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With