> 
> For instance, I have a panel of JButtons, each of them registered for the
> TAB keystroke. (I did not register them myself. They appear to registered by
> the underlying UI delegate). 

Hmm, don't think so. Usually the FocusManager get's all the tabs
(Ctrl-tab unconditionally, the normal tabs if the Component is not
interested in it). And Buttons are not interested in tabs as far as I
remember.

> The buttons reside in a JPanel which is also
> registered for the TAB keystroke (under the condition of
> JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT since it never gets focus
> directly). The problem is that the JPanel never detects the TAB key input.

Let the panel return true on isManagingFocus(). That's the method the
FocusManager calls to check the components' interest in tabs. No - will
not work (just checked my notes...). FocusManager is the first to see
any keyevent of a focused component and processes the tabs if the
isManagingFocus returns false. Since your panel never gets focus it
never passes any keyevents to FocusManager, since the components on the
panel don't manage focus the tab is never reaches the bindings
processing...

Why do you want the panel to get the TAB?

Greetings
Jeanette


_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to