Results 1 to 2 of 2
- 11-18-2009, 09:51 AM #1
Member
- Join Date
- Nov 2009
- Posts
- 2
- Rep Power
- 0
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().Last edited by Sandworm; 11-19-2009 at 04:09 PM.
- 11-19-2009, 08:58 AM #2
Member
- Join Date
- Nov 2009
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
SWT Canvas drawing realtive to image space not canvas space.
By bobbie in forum SWT / JFaceReplies: 0Last Post: 07-05-2009, 12:31 PM -
updating server side file using java bean
By tskarthic in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 04-30-2009, 02:53 PM -
java program for updating bank details
By java__beginner in forum New To JavaReplies: 5Last Post: 03-12-2009, 03:42 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks