Mechanics of Double Buffering
To accomplish this, we’ll need some tools:
- An off-screen image, upon which we draw
- A graphics context for that off-screen image
- Some way of making sure the size of the off-screen image matches the onscreen drawing area--even if the applet is resized!
- Some way of making sure we create the off-screen image the first time