private void customLayoutViewPort() { try { Object nullArray = Array.newInstance(UpdateListener.class, 0); reflectionField.set(getLightweightSystem().getUpdateManager(), nullArray); getLightweightSystem().getUpdateManager().addUpdateListener(new UpdateListener() { @Override public void notifyPainting(Rectangle damage, java.util.Map dirtyRegions) { if (containerForSearchTextBox != null) { int count =((Composite)containerForSearchTextBox).getChildren().length; containerForSearchTextBox.setBounds(0, 0, containerForSearchTextBox.getBounds().width, containerHeight*count); } } @Override public void notifyValidating() { if (!isDisposed()) { layoutViewport(); } } }); } catch (IllegalAccessException e) { LOGGER.error(e.getMessage(),e); throwExceptionWhenReflectionIsFailed(e); } }