I want to be able to go through a folder containing files and display the files that have been specified. I currently have it hard coded... Cc
public void searchResult(String a) throws IOException {
FileReader inputFile;
a = "C:\\IO\\Project.txt";
try {
inputFile = new FileReader(a);
BufferedReader br = new BufferedReader(inputFile);
while ((str = br.readLine()) != null) {
searchResult.setText(str);
}
} catch (FileNotFoundException ex) {
Logger.getLogger(SearchResults.class.getName()).log(Level.SEVERE, null, ex);
}
}
Please, I need something more dynamic.