if (listingMode == JFileChooser.FILES_ONLY) return contents.indexOf(o) - directories;
  public int indexOf(Object o)  {    if (listingMode == JFileChooser.FILES_ONLY)      return contents.indexOf(o) - directories;    return contents.indexOf(o);  }