public interface FocusListener extends EventListener
FocusAdapter
类(只覆盖方法的兴趣)。从这个类进行了注册一个组件使用的组件的
addFocusListener
方法创建监听对象。当组件获得或丢失键盘焦点,在监听对象相关的方法被调用时,与
FocusEvent
传递给它。
FocusAdapter
,
FocusEvent
,
Tutorial: Writing a Focus Listener
Modifier and Type | Method and Description |
---|---|
void |
focusGained(FocusEvent e)
当一个组件获取键盘焦点时调用。
|
void |
focusLost(FocusEvent e)
当一个组件丢失键盘焦点时调用。
|
void focusGained(FocusEvent e)
void focusLost(FocusEvent e)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.