SWT « JLabel « Java Swing Q&A





1. How to have a Label inherite a Composite's GC in SWT    stackoverflow.com

I'm writing an app and our designer's want to user gradient's for some of the backgrounds on a few of our composite's. I wrote the following code:

composite.addListener (SWT.Paint, new Listener () ...

2. SWT Equivalent of JPANEL    stackoverflow.com

What's the equivalent of a JPANEL in SWT?

3. SWT - Wrap label    coderanch.com

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.

4. Invisible Label [SWT]    coderanch.com

I'm trying to create an SWT Form which displays a series of labeled text boxes. The problem is that labels other than the first do not display. I've reduced the failing code to the sequence below. This will display the first label (l1) but not the second. I've removed text boxes which were associated with the labels. When the text boxes ...

5. Opaque Labels in SWT?    coderanch.com

6. SWT/Swing JLabel repaint issue    coderanch.com

I am porting a Swing/AWT application to RCP/SWT. I created the top-level portion of my UI to use RCP/SWT. I have the view which parents an embedded Composite which parents a TabFolder containing TabItems. As a first step, one of my TabItems parents an AWT Frame (e.g., SWT_AWT.new_Frame(this)) which then parents the crux of my original Swing/AWT UI. In this part ...

7. SWT: Why do I get "MeterToInch2.java:24:5: non-static variable label cannot be.."?    coderanch.com

ah alright. I have chosen to make the variables static.. Aem. The error is now gone but unfortunately the window opens and closes immediatly. Somehow the loop doesn't work. What's wrong with that? Update: The dispose was in the loop. It has to be below.. [ April 06, 2008: Message edited by: Andreas Balzer ]

8. SWT Label position on screen    coderanch.com

Hello i was wondering how i can find out the x and y position of a label on the screen because i wan to put the cursor there. getBounds() and getLocation() seem to give me only the location within the composite the label is in, but i want to know its x and y location on the screen. Any ideas? Thanks ...