File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes how to redirect backspace key to some other function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "how to redirect backspace key to some other function" Watch "how to redirect backspace key to some other function" New topic
Author

how to redirect backspace key to some other function

danish shaikh
Greenhorn

Joined: Nov 09, 2004
Posts: 21
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

Joined: Jul 30, 2003
Posts: 805
You can define the key's action in your ActionListener actionPerformed method.


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
danish shaikh
Greenhorn

Joined: Nov 09, 2004
Posts: 21
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to redirect backspace key to some other function