看了孙鑫老师的视频:“java从入门到精通 ”,里面介绍了通过增加一个窗口监听器,实现窗口的关闭的方法。但是对其具体实现过程,我有些疑问。
Interface WindowListener
void | windowActivated(WindowEvent e) Invoked when the Window is set to be the active Window. |
void | windowClosed(WindowEvent e) Invoked when a window has been closed as the result of calling dispose on the window. |
void | windowClosing(WindowEvent e) Invoked when the user attempts to close the window from the window's system menu. |
void | windowDeactivated(WindowEvent e) Invoked when a Window is no longer the active Window. |
void | windowDeiconified(WindowEvent e) Invoked when a window is changed from a minimized to a normal state. |
void | windowIconified(WindowEvent e) Invoked when a window is changed from a normal to a minimized state. |
void | windowOpened(WindowEvent e) Invoked the first time a window is made visible. |
这个监听器含有许多方法。
当我们点击关闭按钮时,系统怎么知道调用哪一个方法,
我们的这个点击事件具体又是如何传递的?
希望哪位高人指点一二,不甚感激!