Changing the way JTextPane renders HTML
Hello, I am using Java's JTextPane to display an HTML (with possibly CSS/XML) page. What I want to do is alter the way it renders some tags (like <!-- comment tags -->, or Flash <object> tags) and add additional tags to its rendering capability, both by hardcoding, and possibly (though this is of secondary importance) dynamically, to accomodate XML.
For example, JTextPane, by default, cannot render .swf flash files. It displays two red "??." I would like to be able to change that to a notice stating that JTextPane does not support flash objects.
For another example, It seems to be excluding the end ">" from links, displaying it as text, rather than hiding it with the rest of the HTML. Whether the </a> or <a href....>'s end tag, I cannot tell. I would like to be able to override somehow the way JTextPane renders links to fix that.
So far, I have had no success. The closest I have come is that the solution probaly lies with the HTMLEditorKit class, but I don't know for sure, or I wouldn't be asking here.
So: How can I alter the way JTextPane renders HTML tags, and add tags to its rendering capabilities?
Thanks in advance.