I'm working on a GUI application which copntains 6 tabbed pane. i've to wite a focus traversal policy so that on pressing on the successive tabs (ctrl+tab) the focus moves on each tab. i've witten a focus traversal policy for this purpose and calling it in my main GUI creation method.
and when a tab is selected focus moved to a specified button in that pane.
so where should i put up policy class and how can i call in my class.
posted 11 years ago
You should be able to treat the tabbed pane as the focus cycle root of your traversal.
Alternatively, you could set the default policy from the KeyboardFocusManager before creating your components. You would still need to make sure that the tabbed pane is a focus cycle root. I can't remember exactly, but from what you describe you may find that the existing default policy will provide the traversal behaviour you require anyway.