show html text at the bottom of the JTextPane -


i've been trying show text @ bottom of jtextpane area using html. it's not supporting styles, used following code:

<!-- saved url=(0040)file:///c:/users/tusim/desktop/test.html --> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <style type="text/css"> table { font-family:"tahoma"; font-size:11; width: 100% } td, th { background-color: white} .header {font-weight:bold;} .record-first {font-weight:bold; min-width: 130px;} </style> </head> <body><table border="0" cellpadding="2" cellspacing="1" height="95%"><tbody><tr height="95%"><td width="32%" height="95%" valign="top"><div style="background-color: black; width: 100%;"><table border="0" cellpadding="2" cellspacing="1"> <tbody><tr class="header"> <td align="center">col 1</td> </tr><tr><td>val 1</td></tr></tbody></table></div></td><td></td><td width="32%" valign="top"><div style="background-color: black; width: 100%;"><table border="0" cellpadding="2" cellspacing="1"> <tbody><tr class="header"> <td align="center">col 2</td> </tr><tr><td>val 2</td></tr></tbody></table></div></td><td></td><td width="32%" valign="top"><div style="background-color: black; width: 100%;"><table border="0" cellpadding="2" cellspacing="1"> <tbody><tr class="header"> <td align="center">col 3</td> </tr><tr><td>val 3</td></tr></tbody></table></div></td></tr><tr height="5%" valign="bottom"><td colspan="5" valign="bottom">some text</td></tr></tbody></table></body></html> 

but although it's working on browser, not in jtextpane. can please me out.

thanks in advance...

are sure jtextpane supports tables?

instead of using jtextpane, use jeditorpane. can render html well, although has called htmleditorkit, can parse html documents.

here's example:

htmleditorkit kit = new htmleditorkit(); // creates instance editorpane.seteditorkit(kit); // sets editor kit 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -