I'm working on a program for my Java class. In this program I have the main class dopewars1 and some sub-classes: Cities, cops, copFight, and player.
In dopewars1 I have a canvas everytime something changes in the subclasses I need to repaint the Canvas. I call the repaint() method
and it does nothing. The only way to get the Canvas to repaint is to resize the window or minimize/maximize it, etc.
Since dopewars1 implements WindowListener I've tried to call repaint() from the windowClosed and the windowClosing methods but to no avail. I've also tried calling repaint() from the subclasses.
The program is a little long so below is a link to all the code if you're interested.
http://www.sevencorp.net/dopewars.zip
Thanks for any help.
In dopewars1 I have a canvas everytime something changes in the subclasses I need to repaint the Canvas. I call the repaint() method
and it does nothing. The only way to get the Canvas to repaint is to resize the window or minimize/maximize it, etc.
Since dopewars1 implements WindowListener I've tried to call repaint() from the windowClosed and the windowClosing methods but to no avail. I've also tried calling repaint() from the subclasses.
The program is a little long so below is a link to all the code if you're interested.
http://www.sevencorp.net/dopewars.zip
Thanks for any help.