| Author |
help,how to improve JTextPane's efficiency?
|
zhijie dong
Greenhorn
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); StyleConstants.setForeground(defaultStyle,Color.RED); Style infoStyle=textpane.addStyle(null,null); StyleConstants.setForeground(infoStyle,Color.BLUE); int count=1; while(true){ doc.insertString(doc.getLength(), ""+count, errorStyle); doc.insertString(doc.getLength(), ""+count, infoStyle); count++; }
|
 |
 |
|
|
subject: help,how to improve JTextPane's efficiency?
|
|
|