Flashing screen on applets.

Started by Melssj5, December 13, 2004, 12:57:51 AM

Previous topic - Next topic

Melssj5

Hello, I am doing an awt applet, so I put all the rendering code in the paint (); when something happens I use repaint (); but it flashes a lot, I thing that reloading the paint is not the best way to do it, but is there someway to constantly load that piece if code without using the paint?. I want the game to run inside my applet, thanks. :shock:
Nada por ahora

EgonOlsen

Try to not only override paint() but also update() and let your new update()-method call your paint()-method. That should help to get rid of the flickering. Personally, i'm used to override both with nothing and doing the updates myself using the Applet's Graphics-Instance directly, but it depends on what you are doing exactly (i.e. are you still using AWT-components or does your game fills the whole applet?) if this is good idea or not.