JComponent wrapServiceToolbar(@NotNull JComponent toolbarComponent, boolean horizontal) {
    JPanel wrapper = new JPanel(new BorderLayout());
    wrapper.add(toolbarComponent, BorderLayout.CENTER);
    toolbarComponent.addComponentListener(new ComponentListener() {
      @Override
      public void componentResized(ComponentEvent e) {
      }

      @Override
      public void componentMoved(ComponentEvent e) {
      }

      @Override
      public void componentShown(ComponentEvent e) {
        wrapper.setVisible(true);
      }

      @Override
      public void componentHidden(ComponentEvent e) {
        wrapper.setVisible(false);
      }
    });
    wrapper.add(createEmptyToolbar(horizontal, toolbarComponent), horizontal ? BorderLayout.EAST : BorderLayout.SOUTH);
    return wrapper;
  }
JComponent wrapServiceToolbar(@NotNull JComponent toolbarComponent, boolean horizontal)