"Farwell, Paul" schrieb:

> The FocusManager is getting (and consuming) the TAB characters. You are also
> correct that the JPanel doesn't really need to intercept the key strokes. I
> did that only because it fit my design better. What I am now doing instead
> is to create a subclass of JButton and override its processKeyEvents()
> method. That *appears* to be the only way to trap the TAB key before the
> FocusManager consumes it. That is, processKeyEvents of JComponent gets
> called before the FocusManager does its stuff.
> 
> So far it seems to work...

If you are subclassing JButtons anyway you might try to let them return
true on isManagingFocus and _not_ trap the TAB in processKeyEvents. Now
the TAB should fall through to keyboard bindings and you can handle it
centrally in one place, f.i. in an action registered to the panel when
it is the ancestor of the components. 

Greetings
Jeanette


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

Reply via email to