I'm trying to read multiple text files into a JTextArea. I'm currently selecting them via JFileChooser dialog, which returns the selectedFiles back as a File. When I try and output the files contents it only displays the last file read in.
You could write the sequence of files into a temp file and read it into the text area. Or, you could make a PlainDocument, write the files into it with the insertString method and set the document in the text area. Or, you could use the append method and write as you read the files:
Joined: Jul 02, 2006
For large text file append goes really slow. I think I'll try merging the files into one large file and initializing the JTextArea with that. Thanks for the help.