I have two animations, each of which works fine when it's the only applet in the web page. I would like to have them in the same web page, but when I do, if one is scrolled off screen, the one that remains on screen stops updating, unless it is forced to (by scrolling again, for instance). I am afraid there's something really important about threads that I do not understand, since I can't understand why I have this problem. I would appreciate your advice.
Additional information, if it's helpful: the problem occurs in both Firefox and IE; both animations update as long they're both at least partially on screen; I know the threads are still running, even though updating stops, because when I do force an update, the time variable has advanced; if I put a debug statement in either the paint or the update methods, such as System.out.println("painting"), the problem fails to occur.