Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to redirect backspace key to some other function

 
danish shaikh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i want to create TextEditor with track changes facility as in MSWORD 2003.
ie. whenever i delete some text they do not be physically erased instead,
the deleted text shud be displayed in some other color with strike out..
so plz help me its quite urgent.

Bye,
thanks in advance.
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can define the key's action in your ActionListener actionPerformed method.
 
danish shaikh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply, But....
i have included the code in the key event.
i also cosumed the backspace key.
now i want to edit the document but its showing me the the error msg..
java.lang.IllegalStateException: Attempt to mutate in notification
at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1336)
at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:569)

how can i overcome this problem.

Thanks in advance.....

Reply soon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic