Issues with updating a canvas in Java
Hi, guys. I'm having some serious problems with this, have been working on it for some time now - about 2 weeks - and I just can't see the issue I'm having here. Hopefully, a) Someone here can help me and b) This thread is in the right forum, I don't think it's particularly a basic program, but... hey, I could be wrong,. everything is relative.
Anyhow, enough of my rambling. I'm having trouble with the code below, in that it doesn't want to update the world. In theory, when you click the up arrow, it should change to a different picture while the mouse is depressed on it. However, it does not re-render. I'm sure it's an obvious problem, I just can't figure it out, and I'd really appreciate a little help.
I have tried to order the code in order of relevance, so hopefully if you see a problem in GameCanvas (which is where I am CERTAIN the problem is), you don't need to trawl through the rest. I have also attached my program, zipped from the eclipse project folder, just in case that's more helpful.
Thanks to anyone who helps in advance.
EDIT: I actually solved this myself, thank you. It was a simple case of using repaint() instead of update().