This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 15299
    
    6

My code works fine:



Care to show us your code?


GenRocket - Experts at Building Test Data
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
 
 
subject: SWT - Wrap label