I see two ways to go if you want to dispatch all key events in one place: you
can either dominate the keyboard focus management, so only your top-level
container ever gets the focus; or you can bypass the regular AWT keyboard
event dispatch hierarchy and just filter Toolkit events in a global listener.
To dominate keyboard focus management, you can do things like setting a
custom focus traversal policy on your tabbed pane (no focus cycle down) and
setFocusable(false) on all those troublesome buttons (for instance, through a
button factory). For keyboard focus on or after Java 1.4, I like the
tutorial at http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html.
...
There is of course a third way to go: reconsider your assumption that
keystroke event logic shouldn't be associated with GUI components. I have
trouble imagining why you're taking this course, unless it's just to prevent
keystrokes from activating buttons. Maybe all you want is to prevent your
buttons from gaining focus.
Anton Kast