I would like to make a program that in java using netbeans. I want this program to search through a specified folder and display all files into a text area.
here's what I saw on stackoverflow:
File file = new File("/path/to/directory");
String[] directories = file.list(new FilenameFilter() {
@Override
public boolean accept(File current, String name) {
return new File(current, name).isDirectory();
}
});
System.out.println(Arrays.toString(directories));
how do I make it better?