Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.swing.text.html.HTMLDocument ?????

Status
Not open for further replies.

wduty

Programmer
Jun 24, 2000
271
US
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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top