Looking for a Swing HTML renderer
Yesterday a colleague and I went looking for a Swing component that could display HTML. HTMLEditorKit, which ships with Java, turned out to be unusable for files over 300 KB. We need to display fairly large HTML output, and HTMLEditorKit in Java 1.4.2 starts to bog down badly above that size. I thought finding a usable open-source Swing component would take a few minutes. I was way off.
We found a few usable commercial components. Then we found a few promising wrappers around Internet Explorer that we couldn't get to work. Finally, this morning I came across two articles by Joshua Marinacci that review practically every open-source and commercial HTML component out there.
- Java Sketchbook: The HTML Renderer Shootout, Part 1
- Java Sketchbook: The HTML Renderer Shootout, Part 2
Here's the conclusion of the first article, which focused on open-source components.
Overall, our choices are a very mixed bag. JRex offers high compliance and speed, but requires integration with native code. The 100-percent-Java renderers have little support for modern standards, but some (Calpane and Multivalent) can at least render some popular pages accurately.
What about you? Which component do you use to display HTML?
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio
- #1 · Vývojová prostředí v Javě
The first CZ Podcast episode looks at Java development environments. · Czech audio