Skip to content Skip to sidebar Skip to footer

How To Append Css/html Table In Jtextpane

I'm trying to 'append' an css/html table to a jtextpane. When I do: setText like this: jtextpane.setText(css) I get the desired result [perfect!]: but when I try to appe

Solution 1:

You have to declare what type of text you are using in the JTextPane

jtextPane.setContentType("text/html");

If this don't work, try also to include your text with correct <html> that should do. I had the same problem time ago, I am looking for a specific code.

Post a Comment for "How To Append Css/html Table In Jtextpane"