catch a KeypressEvent on all the application

hi, i'm a newby in swing, so please don't be rude

I've a little problem with the Keyprees Event in SWING

My application has many components such as JTable, JTextAreas, and JLabels.

I wanted to catch the Event with a Listener added in the mainFrame that holds all this components. So i don't haver to place a listener on all of them.

I thought that when a component does not catch the Event, it was passed to his container component, but i seems not to work this way.

PLEASE HELP

[519 byte] By [Dash83a] at [2007-10-2 16:35:24]
# 1
Create a KeyEventDispatcher and add it to the KeyboardFocusManager
tjacobs01a at 2007-7-13 17:40:59 > top of Java-index,Desktop,Core GUI APIs...
# 2
thanks tjacobs01 for the answer, but can you be more explicit.i've search in the 1.42 Api about this both classes and does not understand how it work....sorry.thanks although
Dash83a at 2007-7-13 17:40:59 > top of Java-index,Desktop,Core GUI APIs...
# 3
do a search of the forums forKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher
Michael_Dunna at 2007-7-13 17:40:59 > top of Java-index,Desktop,Core GUI APIs...