Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

flashing java program help?

http://pastebin.com/xXUNLtW9

You guys may have seen the same issue I had before. The entire program is grey until up press the a or d buttons, then it flickers to the game, then back to grey. The next time you press the button, though, you can see the blue box had moved, so the key listener is working. If I comment out the super.paint(g) line, then the key listener just doesn't work at all. Help?

Update:

@Link H, BlueJ must have a different compiler than the standard command line compiler, because if it was the same you would be getting my issue. Try running it with that. I do not intend to have the lazers at the moment, just troubleshooting the guy (But that is nice to know for when I get to that).

1 Answer

Relevance
  • Link H
    Lv 6
    9 years ago
    Favorite Answer

    Not sure if this will help you, but when i ran it in BlueJ, it seemed to work with the super.paint(g) commented out. I could use the a and d keys to make the box change direction of motion, and it stopped play when the box touched the sides. There was a problem with the display of no orange 'lazer' which was resolved by changing the y coordinate to something greater than zero.

Still have questions? Get your answers by asking now.