if (win==null) return null;
Rectangle r1 = win.getBounds();
Insets insets = win.getInsets();
Point loc = getLocation();
if (loc.x>insets.left+5 || loc.y>insets.top+5) {
<BUG>r1.width = newWidth+insets.left+insets.right+10;

r1.height = newHeight+insets.top+insets.bottom+10;
if (win instanceof StackWindow) r1.height+=20;</BUG>
} else {

if (win==null) return null;
Rectangle r1 = win.getBounds();
Insets insets = win.getInsets();
Point loc = getLocation();
if (loc.x>insets.left+5 || loc.y>insets.top+5) {
r1.width = newWidth+insets.left+insets.right+ImageWindow.HGAP*2;
r1.height = newHeight+insets.top+insets.bottom+ImageWindow.VGAP*2+win.getSliderHeight();
} else {
