I have help in my Editor whit Jtexpane

Hi I have very problems when i use the setCharacterAttributes my codo when I have problems is

documento.setCharacterAttributes(indi-Llego_lex.length(),Llego_lex.length(),st[ind],false);

This is the instruccion, the documento is the type of DefaultStyledDocument st[] is the type of Style and the execpcion I have is this:

java.lang.ilegalStateException: attempt to mutatate in notification at(javax.swing.text.AbstractDocument.writelock(AbstractDocument.java:1336)

I hope any one can to help me. thanks for all.

[543 byte] By [ely_jelya] at [2007-10-3 5:21:22]
# 1
You can't change a Document from within a DocumentListener.
camickra at 2007-7-14 23:28:19 > top of Java-index,Desktop,Core GUI APIs...