• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to redirect backspace key to some other function

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic