public void setToolbar(@Nullable JComponent c) {
    if (c == null) {
      JComponent toolbar = myToolbar;
      if (toolbar != null) {
        remove(toolbar);
      }
    }
    myToolbar = c;
    if (myToolbar instanceof ActionToolbar) {
      ((ActionToolbar)myToolbar).setOrientation(myVertical ? SwingConstants.HORIZONTAL : SwingConstants.VERTICAL);
    }

    if (c != null) {
      if (myVertical) {
        add(c, BorderLayout.NORTH);
      }
      else {
        add(c, BorderLayout.WEST);
      }
    }

    revalidate();
    repaint();
  }
public void setToolbar(@Nullable JComponent c)