Hi i have two files and one imports the other one.
DoodleCanvas.java
is used in Doodle.java
i have
import DoodleCanvas;
it gives me an error saying i need a "." after s
i have jsk1.4.1
please help....whats wrong? its an example right out of a book so please help soon
Importing other files
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Henrik S. Larsen
Re: Importing other files
import DoodleCanvas.*;
or
import DoodleCanvas.anyPublicMethodInThisClass;
or
import DoodleCanvas.anyPublicMethodInThisClass;
-
Henrik S. Larsen
Re: Importing other files
aaarrrhhh oops 
You cannot of course import methods. Sorry.
And more - if you do not have your classes in a package,
there is not need to import them. Just have them in the classpath.
If they are in the same package - again. No import needed.
If they are in a different package - you can either import the whole package
like my.package.* or just the class: my.package.Myclass
(too bad I cannot delete my first answer)
You cannot of course import methods. Sorry.
And more - if you do not have your classes in a package,
there is not need to import them. Just have them in the classpath.
If they are in the same package - again. No import needed.
If they are in a different package - you can either import the whole package
like my.package.* or just the class: my.package.Myclass
(too bad I cannot delete my first answer)