I have a JList that will list certain files in a directory (may have seen an earlier post, same (JList). It works good, however, it lists the FULL path to the file, that's not what i want, i only want the last part of the full path, so i did this:
String[] files; String Folder = "path"; File fileFolder = new File(Folder); File[] fileList = fileFolder.listFiles(); for(int i=0; i<=fileList.length; i++){ files[i] = file[i].toString(); }
But it doesn't work....
If you can also tell me how to list certain file types (like .jar), that would be greatly appreciated.