Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

large file in JTextArea

  Asked By: Mona    Date: Nov 15    Category: Java    Views: 962
  

Does anyone have experience reading a large txt file (maybe 5MB) into
a JTextArea? I've tries using the .read() and using a
BufferedFileReader to append lines to the JTextArea. Both have proved
to be inefficient.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Zachary Larson     Answered On: Nov 15

Read it all into a string first, then add it to the JTextArea.

 
Didn't find what you were looking for? Find more on large file in JTextArea Or get search suggestion and latest updates.




Tagged: