firstWidget.width = firstWidgetBounds.width;
firstWidget.height = firstWidgetBounds.height;
if (firstWidget instanceof Layout) {
Layout layout = (Layout)firstWidget;
layout.invalidate();
layout.validate();
}
}
if (secondWidget != null && secondWidget.width != secondWidgetBounds.width
|| secondWidget.height != secondWidgetBounds.height) {
secondWidget.x = secondWidgetBounds.x;