开发者

how to handle focus lost and focus gain event using "shift + tab" and "tab"?

开发者 https://www.devze.com 2023-01-18 09:18 出处:网络
I w开发者_StackOverflow中文版ant 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

I w开发者_StackOverflow中文版ant 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号