There is a variable with a null value on line 84. Look at line 84 and find the variable with the null value and then backtrack in the code to find out why that variable does not have a valid...
Type: Posts; User: Norm
There is a variable with a null value on line 84. Look at line 84 and find the variable with the null value and then backtrack in the code to find out why that variable does not have a valid...
I don't do student code. I've explained what you need to do. Do it one small step at a time.
define the x and y and use it in one of the draw methods. Compile and execute to see that is works.
...
Do one thing at a time, get it to work and then try doing another.
First get all of the draw methods to use the x,y variables.
Change all of the draw methods to use the x,y values corrected to...
Do it one step at a time.
Change the calls to the draw method to use variables instead of hardcoded numbers. For example:
g.drawShape(10, 30,...
change to
g.drawShape(x,y,...
Define x and y as...
Do you understand what the parameters are to the draw methods you are using in the paint() method?
If you do not change them, the drawing will always be done at the same place.
Change the...
Please Edit your post and wrap your code with
<YOUR CODE HERE> to get highlighting
To cause a drawn image to be at a different location after a button press, you need to have class variables like...