Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #23227 > unrolled thread

What is the import for a Layer

Started byclusardi2k@aol.com
First post2013-04-03 15:01 -0700
Last post2013-04-03 15:33 -0700
Articles 5 — 5 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  What is the import for a Layer clusardi2k@aol.com - 2013-04-03 15:01 -0700
    Re: What is the import for a Layer Arne Vajhøj <arne@vajhoej.dk> - 2013-04-03 18:18 -0400
      Re: What is the import for a Layer Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-03 19:32 -0300
      Re: What is the import for a Layer "John B. Matthews" <nospam@nospam.invalid> - 2013-04-04 07:26 -0400
    Re: What is the import for a Layer Lew <lewbloch@gmail.com> - 2013-04-03 15:33 -0700

#23227 — What is the import for a Layer

Fromclusardi2k@aol.com
Date2013-04-03 15:01 -0700
SubjectWhat is the import for a Layer
Message-ID<32362f98-0254-4534-b5c7-03c05878f880@googlegroups.com>
I've got a project that doesn't reconize "Layer". Is there something that I can try importing to get past this error.

Thanks,

[toc] | [next] | [standalone]


#23228

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-04-03 18:18 -0400
Message-ID<515caac7$0$32111$14726298@news.sunsite.dk>
In reply to#23227
On 4/3/2013 6:01 PM, clusardi2k@aol.com wrote:
> I've got a project that doesn't reconize "Layer". Is there something that I can try importing to get past this error.

There may be many Layer classes out there.

One is org.jfree.ui.Layer.

You IDE should be able to suggest something.

Arne

[toc] | [prev] | [next] | [standalone]


#23230

FromArved Sandstrom <asandstrom2@eastlink.ca>
Date2013-04-03 19:32 -0300
Message-ID<P527t.313515$SE5.264497@newsfe28.iad>
In reply to#23228
On 04/03/2013 07:18 PM, Arne Vajhøj wrote:
> On 4/3/2013 6:01 PM, clusardi2k@aol.com wrote:
>> I've got a project that doesn't reconize "Layer". Is there something
>> that I can try importing to get past this error.
>
> There may be many Layer classes out there.
>
> One is org.jfree.ui.Layer.
>
> You IDE should be able to suggest something.
>
> Arne
>
>
Also, is there a fully-qualified import statement already in the source 
file, for a Layer class or interface? If not, what is the package of the 
class that needs Layer? These are ways of identifying what Layer is 
required, that and looking at the source to see what kinds of methods 
are invoked on Layer objects, and matching that with APIs you discover 
by Googling.

It's not a safe attitude to "get past" errors, not with imports nor 
anything else. And even if you've got a number of libraries that supply 
class X, and you can successfully compile with several, only one may be 
correct at runtime. Don't rely on your IDE to make the right suggestion, 
it can only know the possibilities: you yourself must know what you need.

AHS

[toc] | [prev] | [next] | [standalone]


#23289

From"John B. Matthews" <nospam@nospam.invalid>
Date2013-04-04 07:26 -0400
Message-ID<nospam-81744F.07264504042013@news.aioe.org>
In reply to#23228
In article <515caac7$0$32111$14726298@news.sunsite.dk>,
 Arne Vajhøj <arne@vajhoej.dk> wrote:

> On 4/3/2013 6:01 PM, clusardi2k@aol.com wrote:
> > I've got a project that doesn't reconize "Layer". Is there something that I 
> > can try importing to get past this error.
> 
> There may be many Layer classes out there.
> 
> One is org.jfree.ui.Layer.

Good call. JFreeChart requires the JCommon class library, a separate 
download: <http://www.jfree.org/jfreechart/download.html>
 
> You IDE should be able to suggest something.

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

[toc] | [prev] | [next] | [standalone]


#23231

FromLew <lewbloch@gmail.com>
Date2013-04-03 15:33 -0700
Message-ID<03369d1c-3353-44d8-a3a5-25e2244eaae3@googlegroups.com>
In reply to#23227
clusa...@aol.com wrote:
> I've got a project that doesn't reconize "Layer". Is there something that I can try importing to get past this error.

Yes.

But you need to provide complete information. What do you mean the 'project ... doesn't 
recognize "Layer"'?

How do you know?

What is 'Layer'? Is it a type? What package is it in? What JAR?

You need either to fully qualify the type name or import that type according to the standard, 
basic, fundamental use of 'import', which would have been one of the earliest things you would 
have learned in Java.

So if the package is, for example, 'com.example.foo.layer', and 'Layer' is a type within that 
package, you would refer to 'Layer' in source either as 
'com.example.foo.layer.Layer'
or use 'import' to allow you to use the simple type name elsewhere in your source module

  import com.example.foo.layer.Layer;

  public class YourClass 
  {
    . . . 
        Bar kabar = new Layer().framitz();
    . . . 
  }

But you really have to explain what you mean and be precise about what you observe (such 
as error messages, etc.) to give anyone enough information to help you. Consider studying

http://sscce.org/

and providing one.

-- 
Lew

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web