Suppose you have an HTML document contained in a String variable or in a file. How would you create a java.swing.text.html.HTMLDocument object using that string as content. I don't know much about the swing api and the only constructor I see that even vaguely resembles this approach is:
HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
But looking at class AbstractDocument.Content is even more confusing and I don't see how you get your content into an HTMLDocument object.
For example in the XML API you can insert string content from a file like this:
XmlDocument doc = new XmlDocument();
doc = doc.createXmlDocument(uri);
Anyone know anything about working with HTML in the swing classes? Any comments or guidance appreciated greatly. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
HTMLDocument(AbstractDocument.Content c, StyleSheet styles)
But looking at class AbstractDocument.Content is even more confusing and I don't see how you get your content into an HTMLDocument object.
For example in the XML API you can insert string content from a file like this:
XmlDocument doc = new XmlDocument();
doc = doc.createXmlDocument(uri);
Anyone know anything about working with HTML in the swing classes? Any comments or guidance appreciated greatly. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]