use DocumentFilter to consume keyboard events in java JTextComponents, the structure is as follows:
Hope this was sutisfuctory to your problem
- declare a class that extends DocumentFilter class
- from yout text Component instance get the AbstractDocument object
- set the document filter of that Abstract Document to be the instance of your class that extends the DocumentFilter
- using the and override the methods of the Document filter class
Hope this was sutisfuctory to your problem
for more more information please refer http://www.oracle.com/
ReplyDelete