[求助]谁有使用WindowListener的代码啊?
谁有使用windowListener的简单代码啊!
要简单的 只用到windowListener的
[此贴子已经被作者于2006-3-28 13:46:48编辑过]
搜索更多相关的解决方案:
代码
----------------解决方案--------------------------------------------------------
QQ:279696323
----------------解决方案--------------------------------------------------------
import java.awt.event.*;
class MyListener implements WindowListener{
public void windowDeactivated(WindowEvent we){
//做当前窗口变为非活动状态的事
}
public void windowActivated(WindowEvent we){
//做当前窗口变为活动状态时的事
}
public void windowClosed(WindowEvent we){
//做窗口关闭了以后的事
}
public void windowClosing(WindowEvent we){
//做窗口正在关闭时的事
}
public void windowDeiconified(WindowEvent we){
//做窗口还原时的事
}
public void windowIconified(WindowEvent we){
//做窗口最小化时的事
}
public void windowOpened(WindowEvent we){
//做窗口第一次被打开时做的事
}
}
//这是实现接口的方法,如果觉得麻烦,可以继承自WindowAdapter
----------------解决方案--------------------------------------------------------