Mechanics of Double-Buffering
Now, let’s check to see if the applet has been resized:
// has the component been resized?
if ((curD.width != size().width) || (curD.height != size().height)){
curD = size();
osImg = createImage (curD.width,
curD.height);
osG = osImg.getGraphics();
}
Previous slide
Next slide
Back to first slide
View graphic version