0

hi, so i coded a projectile motion java applet, not only with this but with many other programs i get problems which seem to me to be a memory issue. But the first time lets say I shoot hte projectile it will not show the screen until it has landed and after that i lauch again it shows the projectile live as it should have shown the first time.

Before fired the first time: http://i.imgur.com/V4LnC.png

During flight: http://i.imgur.com/020nD.png

Landed: http://i.imgur.com/g7pJ1.png

Edited by Yarra

3
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by Yarra
1

It could be your GUI display. Can't really pin point anything unless I see some source code.

0

It could be your GUI display. Can't really pin point anything unless I see some source code.

Do you think code can actually cause this though?

0

"memory problems" in Java are pretty much limited to Java throwing an out of memory exception. If you don't have such an exception it's 99% certain you have a problem with your code.

0

since its an applet most likely its a problem with the gui? well i added an if statement in the gui that periodically checks for an intersection after that this occured.

0

Ok guys

repaint();

was the method missing in the snese i should have been calling it before the if statment, i guess thats just how paint() methods work i dunno really but htanks all!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.