code: public void setToolBar(JToolBar newToolBar) {
          JToolBar oldToolBar = getToolBar();
          if (oldToolBar == newToolBar) {
              return;
          }
          if (oldToolBar != null) {
              headerPanel.remove(oldToolBar);
          }
          if (newToolBar != null) {
              newToolBar.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
              headerPanel.add(newToolBar, BorderLayout.EAST);
          }
          updateHeader();
          firePropertyChange("toolBar", oldToolBar, newToolBar);
      }
docs: Sets a new tool bar in the header.
  
  @param newToolBar
  the tool bar to be set in the header