Using Sub/Super scripts in JCheckboxes

So I have a JCheckbox and I want it's label to be "t2 symmetry" except I would like the 2 to be in subscript.

I understand that many swing components support HTML but even using <HTML><sub>subscript</sub></HTML>

doesn't work, I figured it was just because the Jcheckbox doesn't support it since I've seen other posts in this forum regarding using HTML or even just a <sub> command. But as I'm building in my NetBeans Matisse setup those command don't work in JLabels either.

There HAS to be a way to make subscripts work in Java 6 SE.

What can I do to make this work?

Thanks.

[648 byte] By [chemputersa] at [2007-11-27 8:56:05]
# 1
http://java.sun.com/docs/books/tutorial/uiswing/components/html.htmlHmm... looks like it should work. The only thing I see that could possibly be off is the capitalization of the "<HTML>" tag.
myncknma at 2007-7-12 21:18:20 > top of Java-index,Java Essentials,Java Programming...
# 2

In the future, Swing related questions should be posted in the Swing forum.

It works fine for me.

If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",

see http://homepage1.nifty.com/algafield/sscce.html,

that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

Don't forget to use the "Code Formatting Tags",

see http://forum.java.sun.com/help.jspa?sec=formatting,

so the posted code retains its original formatting.

camickra at 2007-7-12 21:18:20 > top of Java-index,Java Essentials,Java Programming...