• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane and large documents  RSS feed

 
Mike Z
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Is there a fast way to assign text to a JTextPane ? Currently, I use insertString() which for a file of about 300k takes a couple seconds. There seems to be a bottleneck at this point. I am concerned since I need to handle files of 1meg+.

I haven't done anything extra like colorizations or font changes yet, but will have to in the future (otherwise I would have used JTextArea). I am using the latest version of Swing.
Thanks in advance,
-Mike Z.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!