public interface WindowStateListener extends EventListener
有兴趣处理窗口状态事件的类可以实现这个接口(和它包含的所有方法),或扩展抽象的WindowAdapter
类(仅覆盖感兴趣的方法)。
然后使用Window
的addWindowStateListener
方法Window
窗口注册从该类创建的侦听器对象。 当窗口的状态由于被图标化,最大化等而windowStateChanged
时,调用侦听器对象中的windowStateChanged
方法,并将WindowEvent
传递给它。
WindowAdapter
, WindowEvent
Modifier and Type | Method and Description |
---|---|
void |
windowStateChanged(WindowEvent e)
窗口状态改变时调用。
|
void windowStateChanged(WindowEvent 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.