Many Swing components support embedded HTML, but I cannot find any official documentation on that subject. (Everything on Sun's pages about HTML seems to be targeted at JEditorPane)
So: Which HTML tags are supported in Swing components?
EDIT: Although I said that I'm missing "official documentation", I'd also like any "unofficial" documentation.
The use of HTML is supported by most Swing components. For example, it is possible to use HTML markup to create multiline and multifont labels: JLabel label = new JLabel("<html>line 1<p><font color=blue size=+2>" + "big blue</font> line 2<p>line 3</html>");
It has built in support for HTML. No how. Look for another component.
Swing supports HTML 3.2 (Wilbur) as Software Monkey said. You can find official documentation to this obsolescent (1996) version of HTML at: http://www.w3.org/TR/REC-html32.html
Java 7 documentation on the topic: http://docs.oracle.com/javase/7/docs/api/javax/swing/text/html/package-summary.html
Though it is worth of noting that it does not explicitly mention this information is valid for other Swing components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With