Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextPane and large documents

Mike Z
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!