docs: public static void removeTopSeparators(JPopupMenu popupMenu) {
          while (popupMenu.getComponentCount() > 0 && isPopupMenuSeparator(popupMenu.getComponent(0))) {
              popupMenu.remove(0);
          }
      }