protected AbstractTabWindow(boolean showContent, WindowItem windowItem) {
    super(windowItem);
    if (showContent) {
      TabContentPanel contentPanel = new TabContentPanel() {
        public Dimension getMinimumSize() {
          if (getTabWindowProperties().getRespectChildWindowMinimumSize())
            return super.getMinimumSize();

          return new Dimension(0, 0);
        }
      };
      tabbedPanel = new TabbedPanel(contentPanel, true) {
        public Dimension getMinimumSize() {
          if (getTabWindowProperties().getRespectChildWindowMinimumSize())
            return super.getMinimumSize();

          return getTabbedPanelMinimumSize(super.getMinimumSize());
        }
      };
      contentPanel.setTabbedPanel(tabbedPanel);
    }
    else
      tabbedPanel = new TabbedPanel(null) {
      public Dimension getMinimumSize() {
        if (getTabWindowProperties().getRespectChildWindowMinimumSize())
          return super.getMinimumSize();

        return getTabbedPanelMinimumSize(super.getMinimumSize());
      }
    };

    tabbedPanel.addTabListener(new TabWindowMover(this, tabbedPanel));
    setComponent(tabbedPanel);

    getTabbedPanel().addTabListener(new TabAdapter() {
      public void tabAdded(final TabEvent event) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            updateButtonVisibility();
          }
        });
      }

      public void tabRemoved(final TabRemovedEvent event) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            updateButtonVisibility();
          }
        });
      }

      public void tabSelected(TabStateChangedEvent event) {
        AbstractTabWindow.this.tabSelected((WindowTab) event.getTab());
        DockingWindow selectedWindow = getSelectedWindow();

        if (!getIgnoreSelected() && selectedWindow != null)
          selectedWindow.fireWindowShown(selectedWindow);
      }

      public void tabDeselected(TabStateChangedEvent event) {
        WindowTab tab = (WindowTab) event.getTab();

        if (tab != null && !getIgnoreSelected())
          tab.getWindow().fireWindowHidden(tab.getWindow());
      }

      public void tabMoved(TabEvent event) {
        if (!getIgnoreSelected())
          fireTitleChanged();
      }
    });
  }