preferredWidth = Math.max (width, MINIMUM_WIDTH); preferredHeight = Math.max (height, DEFAULT_HEIGHT); OS.XtResizeWidget (handle, preferredWidth, preferredHeight, 0);
preferredWidth = width; int newHeight = Math.max (height, MINIMUM_CHILD_HEIGHT + MARGIN_HEIGHT); int[] argList = new int[] { OS.XmNwidth, 0 }; OS.XtGetValues (handle, argList, argList.length / 2); OS.XtResizeWidget (handle, argList[1], newHeight, 0);
public void setPreferredSize (int width, int height) {	checkWidget();	preferredWidth = Math.max (width, MINIMUM_WIDTH);	preferredHeight = Math.max (height, DEFAULT_HEIGHT);	OS.XtResizeWidget (handle, preferredWidth, preferredHeight, 0);	if (control != null) {		int controlWidth = preferredWidth - MINIMUM_WIDTH - MARGIN_WIDTH;		int controlHeight = preferredHeight - (2 * MARGIN_HEIGHT);		control.setSize(controlWidth, controlHeight);	}}