Skip to content Skip to sidebar Skip to footer

Html Wrapped String Creates A Unwanted New Line In Jtextpane Output

When I concentrate a String with a HTML formatted string, and output the String to a JTextPane with a HTMLEditor kit, every appended String wrapped in the HTML tags appears to cau

Solution 1:

The problem is that you inserts the incorrect HTML (as it was mentioned in the comment of @AndrewThompson). The easiest way in your case to get the correct result is to remove all <html> and </html> tags from your strings, then merge these strings and append <html> and </html> after that. In this case you'll get the correct HTML, that can be processed by the HTMLEditorKit of JTextPane


Post a Comment for "Html Wrapped String Creates A Unwanted New Line In Jtextpane Output"