3月23日,TestFrame采用事件适配器方式,每日20行。
2017-03-23 21:55
423 查看
import java.awt.*; import java.awt.event.*; public class TestFrame extends WindowAdapter { public static void main(String[] args) { Frame f = new Frame("A Test Window"); f.setSize(320, 180); f.setVisible(true); f.addWindowListener(new TestFrame()); } public void windowClosing(WindowEvent e) { System.out.println("我退出了!"); e.getWindow().setVisible(false); ((Window)e.getComponent()).dispose(); System.exit(0); } }
相关文章推荐
- 3月24日,TestFrame采用适配器形式产生匿名对象,每日20行。
- 3月22日,TestFrame采用接口形式产生匿名对象,每日20行。
- 3月20日,TestFrame_Listener,每日20行。
- IOS如何从其它事件中根据条件采用segue方式跳转到其它页面
- 3月21日,TestFrame对象是事件源又是监听者,每日20行。
- 3月23日,从子 activity 获取返回结果,Android 开发,每日20行,第14天。
- 3月5日,TestFrame,每日20行。
- 在适配器中点击监听给activity中的控件赋值,采用接口回调的方式
- 一个Download.jsp文件 (采用文件流读写方式。可以防止doc.excl等文件打开时乱码问题)
- 采用修改导入节的HOOK方式使用范围
- 事件适配器--EventAdapter
- DataGrid系列技巧(导出excel,事件,多种方式呈现数据,全选全删)等等等
- 在C#中使用代理的方式触发事件
- JavaScript中的5种事件使用方式解说
- DataGrid系列技巧(导出excel,事件,多种方式呈现数据,全选全删)等等等
- 在C#中使用代理的方式触发事件
- 采用面向对象的方式创建window原生程序
- 函数的参数最好采用引用方式读入
- .Net(c#)采用“晚期绑定”方式调用DLL
- 采用离散化处理方式