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.
source share