This week's book giveaway is in the Security forum.
We're giving away four copies of Penetration Testing Basics and have Ric Messier on-line!
See this thread for details.
Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help,how to improve JTextPane's efficiency?

zhijie dong
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
such as:

if there have 20 thousand rows,how to do?

StyledDocument doc=new StyledDocument();
JTextPane textPane=new JTextPane(doc);

Style errorStyle=textpane.addStyle(null,null);

Style infoStyle=textpane.addStyle(null,null);

int count=1;
doc.insertString(doc.getLength(), ""+count, errorStyle);
doc.insertString(doc.getLength(), ""+count, infoStyle);
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic