printing the contents of a string buffer

hi,

i want to print the contents of my string buffer object. My string buffer object looks somthn like this:

strHTML.append("<tr><td bgcolor='#7C9DC2' align='center' class='style2' colspan='2'>" +

"<span class='style2'>"+sectionName+"</span></td></tr>"+

"<tr><td bgcolor='#DDEEFF' align='left' class='style2' colspan='2'> </td></tr>");

it contains HTML text also. I need to provide the print functionality for this..., can someone help me with some sample code......thanx

andy

[597 byte] By [gudguyandya] at [2007-10-2 16:36:26]
# 1
Assuming you mean to a printer (note that "print" can also mean printing to the console, a file, or anywhere really), you could put the entire thing inside a JTextPane, and then use any number of possible means of printing a component to a printer.
trejkaza at 2007-7-13 17:42:40 > top of Java-index,Desktop,Core GUI APIs...