No, quello che hai fatto non è un "double buffering".Originariamente inviato da Luchky16
ho gia implementato il double buffering
codice:public void paint(Graphics g) { bufferGraphics.clearRect(0, 0, dim.width, dim.width); g.drawImage(offscreen, 0, 0, this); for(int i=0; i<bots.length; i++) { bots[i].draw(g); } }
Prima si disegna tutto quanto nel buffer off-screen e poi si usa il Graphics del componente a video per disegnare solo ed unicamente la immagine off-screen. Questo è il double buffering.