views:

13

answers:

1

I want the ability to gain the focus on the next focusable component on clicking tab and to get the focus back on the previous component on shift + tab. So need a help on how to achieve the same. thanks

+1  A: 

Unless I misunderstand your question, what you describe is the default behavior of java Swing on Windows and probably on Linux too. Mac OSX handles tab focus a bit differently (not all elements are reachable by default).

If you want to customize the keyboard focus order and things like that, the default API to do that is via java.awt.KeyboardFocusManager.

Barend