[英]How to know when the gained focus on the first component is initiated by default when parent component became visible or by users actions
I have a popup component which has a first component JTextComponent and I need to recognize in FocusListener where from the focus gained to this component: when popup appears and the component get focus by default or user clicks on it. 我有一个弹出组件,该组件具有第一个组件JTextComponent,我需要在FocusListener中识别从该组件获得的焦点所在的位置:出现弹出窗口时,默认情况下该组件获得焦点或用户单击它。 I didn't find the way to do it using FocusEvent.
我没有找到使用FocusEvent的方法。
Assuming a general use-case, what exactly is it that is tripping you? 假设有一个通用的用例,那到底是什么绊倒了您? In my view:
在我看来:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.