How to represent a list of text files in Jframe?


I am working on an email management application which needs to read all the text files from a particular folder. Now these text files are needed to be presented on Jframe How can I do that? Is JList the way to do it?

If you need to display the names of the files, you should be able to get them using a File object and then, yes, a JList (or even a List) will be greate to show them.

On the other hand, if you want to read the files (open them and siplay the text inside), You should look at JTextArea which is disigned to handle big quantities of text