JButton Underline
Hello friends of the full featured java,
I've got the problem to underline the text on a JButton object.
I know that i can use HTML-tags to format (and underline), but that leads to problems, cause i need to display a text in brackets ("<test></text>" for example).
That leads to a not formated String.
On a JTextPane i can work with styles, is there anything similar for the JButton?
I hope you can help me :)
[460 byte] By [
Jungi-Xa] at [2007-11-26 17:55:21]

# 1
> Hello friends of the full featured java,
>
> I've got the problem to underline the text on a
> JButton object.
> I know that i can use HTML-tags to format (and
> underline), but that leads to problems, cause i need
> to display a text in brackets ("<test></text>" for
> example).
> That leads to a not formated String.
you can still use HTML, you just need to replace special XML characters with their character reference. I can't post an example because these forums covert the character references back to HTML characters... so look here for what to use in place of <, >, &, ", ' : http://www.devx.com/tips/Tip/14068
# 2
> Hello friends of the full featured java,
>
> I've got the problem to underline the text on a
> JButton object.
> I know that i can use HTML-tags to format (and
> underline), but that leads to problems, cause i need
> to display a text in brackets ("<test></text>" for
> example).
Why can't we have text within brackets to <u>Hi</u>(Inside bracket)
I haven't really used much html in my swing components to format text.