e606. Determining Which Component or Window Has the Focus
Posted borter
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了e606. Determining Which Component or Window Has the Focus相关的知识,希望对你有一定的参考价值。
// null is returned if none of the components in this application has the focus
Component compFocusOwner =
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
// null is returned if none of the windows in this application has the focus
Window windowFocusOwner =
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
// Use this method to determine whether a particular component has the focus
boolean b = component.isFocusOwner();
Related Examples |
以上是关于e606. Determining Which Component or Window Has the Focus的主要内容,如果未能解决你的问题,请参考以下文章
e616. Determining If a Focus Lost Is Temporary or Permanent
[CodeForces-606E] Freelancer's Dreams 凸包 模型转换