code: public static void addTo(
          JTabbedPane tabbedPane, String title, JComponent component, 
          boolean confirmClose)
      {
          if (confirmClose)
          {
              addTo(tabbedPane, title, component, CloseCallbacks.confirming());
          }
          else
          {
              addTo(tabbedPane, title, component, CloseCallbacks.alwaysTrue());
          }
      }
docs: Adds a {@link CloseableTab} with the given title and component to
  the given tabbed pane.
  
  @param tabbedPane The tabbed pane
  @param title The title of the tab
  @param component The component in the tab
  @param confirmClose Whether closing a tab has to be confirmed