File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem Document Listener "Attempt to mutate in notification"

 
David Hittel
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have following Problem. I have a couple of jTextField's that are registered to a DocumentListener.

I had the problem that i got always the Exception

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Attempt to mutate in notification
at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1343)
at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:662)
at javax.swing.text.JTextComponent.setText(JTextComponent.java:1441)


Then i was reading a little bit and found a solution, but this solution causes another problem, a endless loop and i get this



I want to call a method "calculate" with just some normal calculation from jTextField values.


The DocumentListener


calls the berechne()



Do you have any solutions, to solve the problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic