Hmm the problem right now is that you are scanning files as well, so the FileFilter is not working. I have no idea why its not, unless maybe you dont have your eclipse actually using java 5+ for a compiler: Window > Prefferences > Java > Compiler, select 5 or 6 from the drop down.
Here is a revised code that doesnt use a FileFilter: (note: i am not compiling this, because i dont have java atm, but it should work)
private ArrayList<File> getFolders(File folder) {
ArrayList<File> listAr = new ArrayList<File>();
File[] list = folder.listFiles();
// puts all the items from the array in an arraylist
for (int i = 0; i < list.length; i++) {
if (listAr.add(list[i]).isDirectory())
listAr.add(list[i]);
}
return listAr;
}