I want to catch a key press anywhere in the main panel.
You should be using
Key Bindings to listen for a specific KeyStroke, not a KeyListener. You can add the Key Bindings to the Root Pane of the frame to listen for KeyStrokes any where in the frame.
I have tried calling both requestFocus() and requestFocusInWindow() on the textarea; neither call helped.
The proper method so use is requestFocusInWindow(), but this method only works once the frame is visible.
and after the user uses a toolbar button.
Make your toolbar buttons non-focusable by using setFocusable( false );