if (selectedIndex != -1) { Control control = items[selectedIndex].getControl(); if (control != null && !control.isDisposed()) { control.setBounds(getClientArea()); } }
void onResize() {	if (updateItems()) redrawTabs();		Point size = getSize();	if (oldSize == null) {		redraw();	} else {		if (onBottom && size.y != oldSize.y) {			redraw();		} else {			int x1 = Math.min(size.x, oldSize.x);			if (size.x != oldSize.x) x1 -= borderRight + highlight_margin;			if (!simple) x1 -= 5; // rounded top right corner			int y1 = Math.min(size.y, oldSize.y);			if (size.y != oldSize.y) y1 -= borderBottom + highlight_margin;			int x2 = Math.max(size.x, oldSize.x);			int y2 = Math.max(size.y, oldSize.y);					redraw(0, y1, x2, y2 - y1, false);			redraw(x1, 0, x2 - x1, y2, false);		}	}	oldSize = size;		// resize content	if (selectedIndex != -1) {		Control control = items[selectedIndex].getControl();		if (control != null && !control.isDisposed()) {			control.setBounds(getClientArea());		}	}}