I have a question about when paint and update method is called??
i have game applet where i want to use double buffering.But i cant use it.the problem is
In my game there is a ball which is moving inside run() method.I want to know how to use double buffering to swap the offscreen image and current image.Someone plz help.
And when there is both update() and paint() method.which are called first,when and why ???
A method you can use is to add a Canvas to the applet and then create a buffer strategy for that canvas. Abstracts the code, and you may get hardware acceleration.
The code is here: http://www.gamedev.net/community/forums/topic.asp?topic_id=405663 — extend AppletGameCore and define your own subclass that implements the required methods.