Hi,
I have a JApplet with two panels in it. I am currently using BorderLayout, with one panel in NORTH and one in CENTER.
Both contain animations and need updating constantly, so I have created a thread in the main applet to call update() every 50 milliseconds.
My problem is that the refreshing is jumpy - sometimes the North panel is smaller and the Center panel paints up a bit, causing a quick 'jump', even at lower refresh rates. I get the impression that I am going about this problem all wrong.
When I use animated gifs in the center panel, it makes the problem much worse. The reason I suspect is that each time a new gif frame needs painting, it casues the center panel to update, and for some reason it thinks it is as 0.0 of the applet window, and not part of the border layout.
Could sometime give me some ideas on how to have two panels, always painting to the same locations ?
Thanks,
Tim
I have a JApplet with two panels in it. I am currently using BorderLayout, with one panel in NORTH and one in CENTER.
Both contain animations and need updating constantly, so I have created a thread in the main applet to call update() every 50 milliseconds.
My problem is that the refreshing is jumpy - sometimes the North panel is smaller and the Center panel paints up a bit, causing a quick 'jump', even at lower refresh rates. I get the impression that I am going about this problem all wrong.
When I use animated gifs in the center panel, it makes the problem much worse. The reason I suspect is that each time a new gif frame needs painting, it casues the center panel to update, and for some reason it thinks it is as 0.0 of the applet window, and not part of the border layout.
Could sometime give me some ideas on how to have two panels, always painting to the same locations ?
Thanks,
Tim