addActionListener(this)
来源:互联网 发布:淘宝上的中药能买吗 编辑:程序博客网 时间:2024/06/07 15:29
在看看一段**.addActionListener(this);为什么必须加this,查了查,原来这里必须有事件监听对象,并且this指本身这个对象,这个类会实现监听器这个接口。
给某个实例(按钮等)添加事件监听接口,this表示当前类的对象,在一个类里,你不需要new他的实例就直接可以用this调用它的方法和属性
0 0
- addActionListener(this)
- addActionListener(this)
- addActionListener
- GUI 大管家 btnEqual.addActionListener(new MyMonitor(this));
- jbtExit.addActionListener
- ? addActionListener()调用actionPerformed()
- GUI TextField类 tf.addActionListener(new TFActionListener());
- this
- this
- this
- this
- this
- this
- this
- this
- this
- this
- this
- 最长递增子序列
- 用户界面View之Chronometer
- win7 64位系统怎么使用debug命令
- Python "Attribute" Definition
- A == B ?
- addActionListener(this)
- Ubuntu 15.04 开发计划确定 最终发布日期2015年4月23日
- 删除linux系统中的eth0.bak与多余的网卡
- windows server 2008 r2 下的VMware虚拟机共享主机上网
- Linux ramdisk启动
- Gradle Android 工程开启 multiDex
- socket.io实践篇(1)
- 符号表之List 实现
- tasklet原理