Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
SWT - Wrap label
Paul Speijers
Greenhorn
Posts: 8
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Ranch Hand
Posts: 15304
6
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
My code works fine:
public class JFaceTest extends ApplicationWindow { public JFaceTest(){ super(null); } protected Control createContents(Composite parent){ Label helloText = new Label(parent, SWT.WRAP); helloText.setText("Hello JFAce: This is some long text to see if it wraps"); parent.setSize(100, 100); parent.setLocation(100, 100); return parent; } public static void main(String[] args) { JFaceTest t = new JFaceTest(); t.setBlockOnOpen(true); t.open(); Display.getCurrent().dispose(); } }
Care to show us your code?
Alexandru Popescu
Ranch Hand
Posts: 995
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
A wild guess: it may be a problem with the Layout and LayoutData you are using.
--
:alex |.::the_mindstorm::.
blog
-
InfoQ.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SWT resize/modal question
SWT: How to prevent window from closing when clicking "X"?
counterpart of frames in swt
SWT Composite setBackgroundImage() doesn't support transparency?
Avoid user entering more than 2 decimal figures in textfield
More...