you should change the visibility of the widget to hidden before to add it to the RootPanel.
Change back the visibility to the old value once the element is attached to the inner container !