Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Composite no constructor
Composite no constructor [message #526683] Mon, 12 April 2010 11:20 Go to next message
Eclipse UserFriend
Hi,
I am newbie
In page http://www.javadocexamples.com/java_source/org/eclipsebook/c h07/Ch07_03.java.html from 2004 on Eclipse 3.5.1 (nowadays)
I try the example, saying for Composite: "can not instantiate the type Composite"
Can't I trust the book?
How can I do?
Re: Composite no constructor [message #526717 is a reply to message #526683] Mon, 12 April 2010 13:31 Go to previous messageGo to next message
Eclipse UserFriend
synhedionn wrote:
> Hi,
> I am newbie
> In page
> http://www.javadocexamples.com/java_source/org/eclipsebook/c h07/Ch07_03.java.html
> from 2004 on Eclipse 3.5.1 (nowadays)
> I try the example, saying for Composite: "can not instantiate the type
> Composite"
> Can't I trust the book?
> How can I do?

Are you sure your code is identical to the code in the example, or did you get
different imports? There are a lot of types named "Composite" and some of them
are interfaces instead of classes; the one you want is
org.eclipse.swt.widgets.Composite. So make sure that your import statements
match those in the example.

Six years is a long time in software, so it is possible that you will find some
things out of date in that book. But I don't think this is one of them.

By the way, the eclipse.newcomers forum is a good place for 'newbie' :-) questions.
Re: Composite no constructor [message #527386 is a reply to message #526717] Thu, 15 April 2010 02:53 Go to previous message
Eclipse UserFriend
OK, thanks.
It came that I had included it from Swing instead of Awt.
Previous Topic:Unable to import joda-time.jar into Eclipse SWT
Next Topic:Adding builders to existing projects
Goto Forum:
  


Current Time: Thu Mar 27 23:58:26 EDT 2025

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

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

Back to the top