Originariamente inviato da Luchky16
e se io volessi disegnare più immagini come faccio con il double buffering?

Edit: scusa potresti farmi un esempio di double buffering per favore?
codice:
public void paint(Graphics g) {
    // Sul buffer off-screen
    bufferGraphics.clearRect(0, 0, dim.width, dim.width);

    for(int i=0; i<bots.length; i++) {
        // Sul buffer off-screen
        bots[i].draw(bufferGraphics);
    }

    // "Butto" tutto quanto a video
    g.drawImage(offscreen, 0, 0, this);
}
È questo il double buffering.