File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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?
It's not a secret anymore!