I want to list only the sub directories of a specific directory, not including files. I used the following code, but files in the "mall" directory also are included.
File mallDir = new File("mall");
if(!mallDir.exists()){System.out.println(mallDir.getName() + " not found."); return;}
if (mallDir.isDirectory()){String[] store = mallDir.list();}
JList list1 = new JList(store);
JScrollPane storeList = new JScrollPane(list1);
Any suggetion? Thanks
File mallDir = new File("mall");
if(!mallDir.exists()){System.out.println(mallDir.getName() + " not found."); return;}
if (mallDir.isDirectory()){String[] store = mallDir.list();}
JList list1 = new JList(store);
JScrollPane storeList = new JScrollPane(list1);
Any suggetion? Thanks