catch a key event in JFrame

hi,

i am coding a GUI application for some FSM(Finite State Machine) simulation purpose. the app can load the FSM and display it. i can selecte some part of FSM and using "delete" key to delete the selected states. i did register the KeyEventListener to the the JFrame. but when i try to press the "del" key the app doesn't do anything. after few tests, i think JFrame never listene to my key event. how can i make it possible to let the JFrame to listene to my "key event"?

Thanks~~~

[504 byte] By [BadCodera] at [2007-10-2 3:25:59]
# 1
Read this, it is very useful for things like this:[url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to Use Key Bindings[/url]In your case you can add a key binding to the frame's root pane, and bind the delete key to the action you want to
happy_hippoa at 2007-7-15 22:35:31 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...