code: protected void updateHeight(CmsPopup dialog) {
  
          int tabIndex = m_panel.getTabPanel().getSelectedIndex();
          boolean changedTab = tabIndex != m_oldTabIndex;
          m_oldTabIndex = tabIndex;
          CmsScrollPanel tabWidget = m_panel.getTabPanel().getWidget(tabIndex);
          Element innerElement = tabWidget.getWidget().getElement();
          int contentHeight = CmsDomUtil.getCurrentStyleInt(innerElement, Style.height);
          int spaceLeft = dialog.getAvailableHeight(0);
          int newHeight = Math.min(spaceLeft, contentHeight + 47);
          boolean changedHeight = m_panel.getTabPanel().getOffsetHeight() != newHeight;
          if (changedHeight || changedTab) {
              m_panel.getTabPanel().setHeight(newHeight + "px");
              int selectedIndex = m_panel.getTabPanel().getSelectedIndex();
              CmsScrollPanel widget = m_panel.getTabPanel().getWidget(selectedIndex);
  
              widget.setHeight((newHeight - 34) + "px");
              widget.onResizeDescendant();
              //dialog.center();
          }
      }
docs: Updates the panel height depending on the content of the current tab.<p>
  
  @param dialog the dialog for which the height should be updated