Skip to main content



      Home
Home » Archived » Visual Editor (VE) » the use of jcheckbox and its corresponding text
the use of jcheckbox and its corresponding text [message #26642] Thu, 18 March 2004 17:37 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:the use of jcheckbox and its corresponding text
Next Topic:JSeparator
Goto Forum:
  


Current Time: Thu May 01 06:22:45 EDT 2025

Powered by FUDForum. Page generated in 0.05709 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top