Add printlns to show all the values that control the setting of the help variable so you can see the values that the computer sees.
Type: Posts; User: Norm
Add printlns to show all the values that control the setting of the help variable so you can see the values that the computer sees.
If there is a logic problem with the setting of variables, then you need to try debugging the code to sort out the logic.
The way I debug is by adding lots of println statements to show what is...
Try debugging the code by adding printlns to print the values of the variables as they are used and their values changed.
I doubt that double buffering could change the values of boolean variables.
When space bar is pressed: The green square starts moving and the two rows of text at the bottom are cleared.
The green square stops moving when the green square touches the red square.
Pressing...
Sorry, I don't know how the program is supposed to function. There were 3 colored squares on start. Pressing the space bar caused one square to chase another. Pressing the arrows moved the chased...
Strange. I made that one change: super.paint(g); //2);
and the code seems to execute ok.
EDIT: The code worked several times. Now the screen is flashing continually???
Try...
The call to super should pass g, not g2.
That problem demonstrates how important good variable names are. The Graphics object for your image should have a unique name that wouldn't be confused with...