the use of jcheckbox and its corresponding text [message #26642] |
Thu, 18 March 2004 17:37  |
Eclipse User |
|
|
|
hi,
suppose the corresponding text for a JCheckBox is very long and won't fit on
one line, is there a natural way for it to run over to the next line? or do
I have to create a JLabel and put it below the first line of the text for
the JCheckBox.
thanks
|
|
|
Re: the use of jcheckbox and its corresponding text [message #26681 is a reply to message #26642] |
Thu, 18 March 2004 20:16  |
Eclipse User |
|
|
|
One pretty spiffy feature of Swing is pretty much anywhere there's text
to be displayed, the text supports use of basic html to do formatting.
By putting <html></html> around the text of the JCheckBox, it will
automatically wrap the text. If you want to put the line break in a
specific location, insert a <br>. This is also handy in that you can
use <u> to underline and <b> to bold, changing fonts and text colors for
some words and not the others. You can even use the <img> tag to
insert images in the middle of text. Fool around with it and you might
be surprised at what it's capable of.
- Jeff
Jonathan wrote:
> hi,
> suppose the corresponding text for a JCheckBox is very long and won't fit on
> one line, is there a natural way for it to run over to the next line? or do
> I have to create a JLabel and put it below the first line of the text for
> the JCheckBox.
>
> thanks
>
>
>
|
|
|
Re: the use of jcheckbox and its corresponding text [message #584864 is a reply to message #26642] |
Thu, 18 March 2004 20:16  |
Eclipse User |
|
|
|
One pretty spiffy feature of Swing is pretty much anywhere there's text
to be displayed, the text supports use of basic html to do formatting.
By putting <html></html> around the text of the JCheckBox, it will
automatically wrap the text. If you want to put the line break in a
specific location, insert a <br>. This is also handy in that you can
use <u> to underline and <b> to bold, changing fonts and text colors for
some words and not the others. You can even use the <img> tag to
insert images in the middle of text. Fool around with it and you might
be surprised at what it's capable of.
- Jeff
Jonathan wrote:
> hi,
> suppose the corresponding text for a JCheckBox is very long and won't fit on
> one line, is there a natural way for it to run over to the next line? or do
> I have to create a JLabel and put it below the first line of the text for
> the JCheckBox.
>
> thanks
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05709 seconds