I am making a program with some animation in it, and there are places where I want a mouse click to call a function that contains several calls to repaint(). The trouble is, no screen painting happens until after the call that the mouse click caused finishes. I know the animation works because I can call it in the main body of my program (not event-driven) and I get wonderful moving graphics. Is there any trick with threading, synchronizing, or anything else I might not have thought of?