How do you display HTML Content inside a Java (Swing) Application?
Hello all,
I have spent quite a lot of time searching for a component which is able to render HTML code (i.e. loaded from a file) inside a Java Swing application. Just like an inline browser. I would like to make use of standard CSS stylesheets and HTML 4. I know that JEditorPane does not meet these requirements. There are other components which do basically a good job like Eclipse Browser Plugin (SWT). But the problem with these components is, that they rely on a previously installed browser.
JWebPane is not part of JDK7 as far as I have seen, so this is also no solution for my case.
I'm interested to hear, how other Java professionals solve this problem. What is your way of solving this problem? Do you buy a component such as the one from WebRenderer.com? Or do you implement something own? Or do you use another GUI framework?
For my project, I have some restrictions:
- Must run on Windows, Mac and Linux
- Should not require a preinstalled webbrowser (dependency)
- Should be HTML 4 and CSS compliant
I am very glad to hear from you.
Thank you very much for your help. I really appreciate that.
Best regards,
André Gasser