i have a problem with the "speed" of setting up a border. i have a display with multiple JTextPane´s (around 450, what is required) which are updated quite often(depending on user input). here is the setting border function:
private void setBorder(int top, int left, int bottom, int right, Color color)
{
Args.checkForNull(color);
this.setBorder(BorderFactory.createMatteBorder(top, left, bottom, right, color));
}
can you give me some tipps on, how to improve the speed of the border changing?? i mean this part:
this.setBorder(BorderFactory.createMatteBorder(top, left, bottom, right, color));
something like:
tmp = this.getStyledDocument();
this.setDocument(blank);
if(onOff){
tmp.setParagraphAttributes(0, tmp.getLength(), underlinedAttr, false);
}
else{
tmp.setParagraphAttributes(0, tmp.getLength(), notUnderlinedAttr, false);
}
this.setDocument(tmp);
thanks!