Swing HTML Preview

That the standard Java Swing text components can render HTML is mighty handy. That they're ornery and underdocumented (as far as what HTML tags/attributes and CSS styles they support) is annoying. Essentially, you've got to try things out to see how they'll look.

So I made this little class to make experimentation easier. Run the executable JAR, and you'll get a window with two text areas. The top, editable, will take your raw HTML. The bottom, not edittable, will live-render your HTML, as each keystroke comes in.

Experiment away!


Swing HTML Preview Files

Executable JAR (created under Java 1.3.1, will probably work elsewhere):
SwingHTMLPreview.jar, 1,926 bytes [Bitzi: F27Y...]
SwingHTMLPreview.java, 2,647 bytes [Bitzi: I7CJ...]

2001-12-31, gojomo@bitzi.com