compiling/debugging question
I have recently begun studying Java and understand the concept and functationality
of compiling the Java file and the creation of the class file. However,
in the event that I cannot successfully compile a Java file, I am essentially
stuck. I am using JDK 1.2.1 and JBuilder as a debugger. In running the
following lines:
public void init() {
Rectgl r = new Rectgl(10,5,Color.red);
Square s = new Square(10,Color.blue);
Circle c = new Circle(20,Color.yellow);
Square s2 = new Square(40,Color.green);
add(r);
add(s);
add(c);
add(s2);
add(new PixLabel(r));
add(new PixLabel(s));
add(new PixLabel(c));
add(new PixLabel(s2));
I received a debug error in JBuilder stating:
"Error (11)class Rectgl not found in class PixApplet"
This error occurs for all of the referenced shapes.
Looks as if it isn't pointing to some necessary files or something? I don't
know, can anyone help?
Re: compiling/debugging question
Make sure to add the appropriate import statements for the
referenced shape objects.
"Ricky" <ricky@stic.net> wrote:
>
>I have recently begun studying Java and understand the concept and functationality
>of compiling the Java file and the creation of the class file. However,
>in the event that I cannot successfully compile a Java file, I am essentially
>stuck. I am using JDK 1.2.1 and JBuilder as a debugger. In running the
>following lines:
>
>
>public void init() {
> Rectgl r = new Rectgl(10,5,Color.red);
> Square s = new Square(10,Color.blue);
> Circle c = new Circle(20,Color.yellow);
> Square s2 = new Square(40,Color.green);
> add(r);
> add(s);
> add(c);
> add(s2);
> add(new PixLabel(r));
> add(new PixLabel(s));
> add(new PixLabel(c));
> add(new PixLabel(s2));
>
>I received a debug error in JBuilder stating:
>
> "Error (11)class Rectgl not found in class PixApplet"
>
>This error occurs for all of the referenced shapes.
>Looks as if it isn't pointing to some necessary files or something? I don't
>know, can anyone help?
>
>
>