swing widgets: Who's got the focus?



I am using panels with etched and titled borders to group my bits and
pieces into functional groups. I am used to Motif where such groups
can have focus. This means I can tell my looking at the screen which
set of widgets I am working with (buttons, radio sets table etc). Tab
then tabs along those widgets. When it reaches the last one it goes to
the next group (grouped into a titled etched border). I do not know
how to do this in swing. I am not sure it is even possible.

I am trying to define keyboard accelerators for my buttons but it is
not clear by looking at the screen when a panel containing the button
has focus. The accelerator seems to work no matter who has the focus.
And it seems I cannot use tab to put the focus to the next widget.
Once I get to a table the TAB key does not take me beyond it when I
get to the end. It cycles around to the start of the table. I am
trying to find out how I can give the user clear feedback as to where
the focus is. I also want the TAB key to move across all the widgets
and to show where the focus has moved to. Can this even be done
please?

Regards,

Andrew Marlow

.


Quantcast