title: GXT (Ext-GWT): Layout problems with ContentPanel
body: <p>I have a ContentPanel that fits the entire window. It has a topComponent, a widget in the center, and a bottomComponent.</p>
  
  <p>I'm getting layout problems, when I try to add widgets to the topComponent after the ContentPanel has been rendered once:</p>
  
  <pre><code>public void onModuleLoad() {
  
      final Viewport viewport = new Viewport();
      viewport.setLayout(new FitLayout());
  
      final ContentPanel contentPanel = new ContentPanel(new FitLayout());
      contentPanel.setHeaderVisible(false);
  
      final LayoutContainer topContainer = new LayoutContainer(
              new FlowLayout());
  
      final Button buttonOne = new Button("Top:One");
      topContainer.add(buttonOne);
  
      contentPanel.setTopComponent(topContainer);
      contentPanel.add(new Button("Center"));
      contentPanel.setBottomComponent(new Button("Bottom"));
  
      viewport.add(contentPanel);
      RootPanel.get().add(viewport);
  
      // Later, add a second button to the topComponent ...
      Scheduler.get().scheduleDeferred(new ScheduledCommand() {
          @Override
          public void execute() {
              final Button buttonTwo = new Button("Top:Two");
              topContainer.add(buttonTwo); // Doesn't show up at first.
  
              topContainer.layout(); // Now, buttonTwo shows up. But we have
                              // a new problem: the "Bottom" button disappears...
  
              contentPanel.layout(true); // This doesn't do anything, BTW.
          }
      });
  }
  </code></pre>
  
  <p>One interesting thing about this is, that the layout corrects itself, as soon as I resize the browser window. What can I do to make it re-layout correctly immediately (I've tried adding several <code>layout()</code> calls etc. in several places and combinations, but haven't had any luck so far.)</p>
  
  <p>(I'm using GWT 2.1.1 with GXT 2.2.1.)</p>