docs: public static void removeConsecutiveSeparators(JPopupMenu popupMenu) {
          for (int i = 1; i < popupMenu.getComponentCount(); i++) {
              if (isPopupMenuSeparator(popupMenu.getComponent(i))) {
                  if (isPopupMenuSeparator(popupMenu.getComponent(i - 1))) {
                      popupMenu.remove(i);
                      i--;
                  }
              }
          }
      }