How do you know if it is or not? Do you have a println statement in it that prints a message when it is called?
What color is the Draw panel supposed to be? I see that the code sets the JPanel:...
Type: Posts; User: Norm
How do you know if it is or not? Do you have a println statement in it that prints a message when it is called?
What color is the Draw panel supposed to be? I see that the code sets the JPanel:...
Is the paintComponent() method being executed?
Did you add the default: case?
The code compiles for me. Make sure the Draw class has been compiled with the new source. Delete the Draw.class file to make sure.
The default: case is still missing from the switch statement....
Yes, that looks like a no-arg constructor.
The drawing of the shapes is done in the paintComponent() method. I'm not sure what you mean by "create" the shapes. The switch statement in the...
Does the Draw class have a no-arg constructor?
See the tutorial: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
Please describe what "it" is supposed to mean.
Please copy and paste the current errors. There have been lots of them posted and I'm not sure which youy are talking about.
ALSO: There should be a default: case in the switch statement that...
Where is the no-arg constructor for the Draw class?
The spelling of the constructor's name must match the class's name.
What happened to the constructor that takes a color? A class can have many different constructors.
Where is the draw() method defined in the draw class? The compiler can not find it.
That is an example of why the naming conventions are helpful.
There is draw a class and draw a method.
It...
That code looks like a no-arg constructor. Did you try it? What happened?
Take a look at the tutorial: http://docs.oracle.com/javase/tutorial/java/javaOO/constructors.html
The compiler could not find a no-arg constructor in the Draw class.
It did find a constructor that takes a Color object.
To make the compiler happy:
either add a constructor to Draw that has...
Where does that code create any shapes?
If the shapes are drawn in another class, that other class needs to be included.
The compiler can not find a class named: Draw. Java is case-sensitive so draw is not the same as Draw
Is the code on line 37 inside of a method?
Please copy the full text of the error message and paste it here.
Please edit your post and wrap your code with code tags:
YOUR CODE GOES HERE
to get highlighting and preserve formatting.