shell.setSize(Math.min(size.x, monitorArea.width - 20), Math.min(size.y, monitorArea.height - 20));
if (size.x > monitorArea.width) { TabItem [] tabItems = instance.tabFolder.getItems(); for (int i=0; i<tabItems.length; i++) { tabItems[i].setText (instance.tabs [i].getShortTabText ()); } size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT); } shell.setSize(Math.min(size.x, monitorArea.width), Math.min(size.y, monitorArea.height));
	static void setShellSize(Shell shell) {		Point size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);		Rectangle monitorArea = shell.getMonitor().getClientArea();		shell.setSize(Math.min(size.x, monitorArea.width - 20), Math.min(size.y, monitorArea.height - 20));	}