Hello everyone,
I hope someone can help me with this problem because I've tried everything I can think of, I've scoured Google, I'm exhausted and still completely stumped.
I have a JTextArea, for which I've called
setFocusTraversalKeysEnabled(false). I've even done the following, though I don't think it's necessary:
setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, null);
setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, null);
When I put the text area in a window (JFrame), the expected happens - Ctrl-TAB doesn't move the focus.
HOWEVER, when I put two of these JTextAreas in a JSplitPane, Ctrl-TAB jumps the focus to a JTextField at the bottom of the window (outside of the JSplitPane)!
I've confirmed with various calls to
getFocusTraversalKeysEnabled() that the traversal keys are indeed disabled (and remaining disabled).
Calling
setFocusTraversalKeysEnabled(false) for the JSplitPane doesn't change anything...
If I catch Ctrl-TAB in a key listener registered on the JTextAreas and consume the event, the focus doesn't move. That is one solution I suppose, but I'm really bugged by the fact that for some reason
setFocusTraversalKeysEnabled(false) isn't working.
Does anyone have any ideas why this could be happening?
THANKS!