SRL Archive - Java Help and Tutorials

Repaint not working?


JPHamlett

2011-05-10 11:07:47

I cant seem to get my paint to update :(

Here's a zip file of my code. It's Chutes and Ladders.


FYI - This still has FAR to go.


The applet loads and everything but when I click it, it doesn't update.

arash

2011-05-13 22:45:33

From: JPHamlett
I cant seem to get my paint to update :(

Here's a zip file of my code. It's Chutes and Ladders.


FYI - This still has FAR to go.


The applet loads and everything but when I click it, it doesn't update.


You didn't implement the MouseListener correctly.

JPHamlett

2011-05-14 00:06:29

I found out its because when I call repaint(){ this.getGraphics();}

It returns a null graphics throwing the NullPointExeption.