if (win == null) {   win = (vWindow) wlist.elementAt(0); }
void resize(vWindow win, int w, int h) {    Dimension d = this.getSize();		// get current size    if (d.width == w && d.height == h) {	return;					// nothing to do    }    this.setSize(w, h);				// alter size    f.pack();					// alter size of enclosing frame    int iw = i.getWidth(null);    int ih = i.getHeight(null);    if (iw >= w && ih >= h) {	return;					// image is large enough    }    if (iw < w) { iw = w; }    if (ih < h) { ih = h; }    Image inew = this.createImage(iw, ih);    Graphics g = inew.getGraphics();    // install new graphics context in each associated window    for (int j = 0; j < wlist.size(); j++) {	((vWindow) wlist.elementAt(j)).newgcb(g);    }    // g has been cloned for use with each window    // we can now use it without affecting anything else    // clear the new image, then copy in the old portion    g.setColor(win.getBg());    g.fillRect(0, 0, iw, ih);    g.drawImage(i, 0, 0, null);    // out with the old, in with the new    g.dispose();    i.flush();    i = inew;}