FXMisc / RichTextFX

Rich-text area for JavaFX
BSD 2-Clause "Simplified" License
1.2k stars 237 forks source link

Ways to speed up jTextArea in java swing when loading a lot of text #827

Closed chimco89 closed 5 years ago

chimco89 commented 5 years ago

I'm using JavaSwing for UI. I'm having to put a lot of text inside of a jTextArea; loading anywhere from 500KB to 5MB of text file into the jTextArea

BufferedReader br = new BufferedReader (new FileReader("filename.txt"));
txtarea.read(br,null);
br.close;
txtarea.requestFocus();

but when read filename.txt then append to txtarea is verry slow. Thanks for any attention in advance!

Jugen commented 5 years ago

Hi @chimco89, you've unfortunately posted to the wrong project. RichTextFx is a JavaFx component and not the JTextArea Swing component.