code: public void insert(Widget widget, Widget tabWidget, int beforeIndex) {
          // Delegate updates to the TabBar to our DeckPanel implementation
          deck.insertProtected(widget, tabWidget, beforeIndex);
      }
docs: Inserts a widget into the tab panel. If the Widget is already attached to
  the TabPanel, it will be moved to the requested index.
  
  @param widget the widget to be inserted.
  @param tabWidget the widget to be shown on its tab.
  @param beforeIndex the index before which it will be inserted.