October 5, 200817 yr I've spent the last week trying to get an application to work in Java.The ultimate goal of what I'm working on now is a fountain, which produces numerous water drops which rise off the top of the canvas.What I would like the erroneous code do is make each water drop in the fountain rise by two pixels. If its y position gets equal or below 0 then the timer should stop.The timer works, it decreases in the interval I have specified, but trying to redraw the water droplet fails.I am beginning to think that I need to use the repaint method of what I have called the "Display" class to repaint all items to make the canvas update. The only issue with this is that is that the water drop objects cannot call the class method repaint (in Display). The timers are a part of each water drop so I've presumed they should be in the water drop object.If someone could look at the attached Java files and explain what part of the implementation is flawed it would be a great help.Not_Repainting.zip Edited October 5, 200817 yr by BrainDrain
Create an account or sign in to comment