wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes SWT - Wrap label Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT - Wrap label" Watch "SWT - Wrap label" New topic
Author

SWT - Wrap label

Paul Speijers
Greenhorn

Joined: Apr 10, 2005
Posts: 8
I've been trying to use a label, but the label text won't wrap. The text is just clipped off at the right of the label.
I simply instantiate it using:

Label label = new Label(composite, SWT.WRAP);

I'm using the label within a composite, which is in a flowlayout.

I'm using the SWT version included with Eclipse 3.0.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

My code works fine:



Care to show us your code?


GenRocket - A Test Data Generation Platform
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
A wild guess: it may be a problem with the Layout and LayoutData you are using.

--
:alex |.::the_mindstorm::.


blog - InfoQ.com
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: SWT - Wrap label
 
Similar Threads
Avoid user entering more than 2 decimal figures in textfield
SWT resize/modal question
counterpart of frames in swt
SWT: How to prevent window from closing when clicking "X"?
SWT Composite setBackgroundImage() doesn't support transparency?