my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes help,how to improve JTextPane's efficiency? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "help,how to improve JTextPane Watch "help,how to improve JTextPane New topic

help,how to improve JTextPane's efficiency?

zhijie dong

Joined: Mar 28, 2005
Posts: 1
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);
I agree. Here's the link:
subject: help,how to improve JTextPane's efficiency?
Similar Threads
JTextPane "lag" (not time issue, color issue)
rmi chat applet
how to print from a JTextPane (or maybe from a DefaultStyledDocument)
font color in JTextArea
setting focus on the appended text in JTextArea