This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SWT - Wrap label