Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Label(x,y) constructor is not defined[solved](Label(x,y) constructor is not defined in Eclipse book Ch07_01)
Label(x,y) constructor is not defined[solved] [message #695873] Tue, 12 July 2011 17:35 Go to next message
synhedionn Mising name is currently offline synhedionn Mising nameFriend
Messages: 15
Registered: March 2010
Junior Member
Hi,

Many java examples speak about Label(x,y) : in Eclipse book Ch07_01 or http://www.eclipse.org/articles/Article-SWT-DND/DND-in-SWT.html#_Drag_Source dragSource l4 .
I'm under linux.
But each time Eclipse 3.5 says there is no such 2 arguments constructor : The constructor Label(Shell, int) is undefined.

So what the hell goes wrong? have the authors ever tested their code , or dis the swt specification change, or what else?

[Updated on: Wed, 13 July 2011 15:08]

Report message to a moderator

Re: Label(x,y) constructor is not defined [message #696008 is a reply to message #695873] Wed, 13 July 2011 04:35 Go to previous messageGo to next message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member
Hi

My guess is that your import is not org.eclipse.swt.widgets.Label.
There are other frameworks providing classes named 'Label' and that
can be confusing. One example is AWT.

I suggest using type filters to filter out any AWT, Swing, ... classes
in SWT projects.

HTH
Michael
Re: Label(x,y) constructor is not defined [message #696093 is a reply to message #696008] Wed, 13 July 2011 08:56 Go to previous message
synhedionn Mising name is currently offline synhedionn Mising nameFriend
Messages: 15
Registered: March 2010
Junior Member
Oh, thanks a lot.
I imported java.awt.Label;
It goes right now!
Thanks
Previous Topic:how to show java/class file under package
Next Topic:How to adjust colors for dark backgrounds?
Goto Forum:
  


Current Time: Thu Apr 25 00:16:13 GMT 2024

Powered by FUDForum. Page generated in 0.08926 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top