class test{
Jbutton modifyButton;
modifyButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg0) { 请问为什么这的this指针是ActionListener()返回的类型,不是test类型,指向test本身??? }
}); public static void main(String args[]){
}}
Jbutton modifyButton;
modifyButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg0) { 请问为什么这的this指针是ActionListener()返回的类型,不是test类型,指向test本身??? }
}); public static void main(String args[]){
}}
解决方案 »
- 初学JAVA SE,弱弱的问一下,日期和时间的转换符信息在API的哪部分?
- 问个菜鸟的问题呵呵
- 求GUI好的教程
- java 中look and feel问题
- 求助:JBuilder2006的安装问题
- Java中调用dll文件,路径设置问题
- 如何用JAVA调用WIN32API,解决后马上给分
- 初学者提问:有没有人看过《面向对象程序设计导轮》thomas wu的?
- 资源文件压入 jar 包里就不能用了,怎么解决?
- 有人用intellij idea吗?code review的插件有吗?
- java菜鸟求助!要求用java写一个程序读取两个.sql文件,然后能手动输入信息将.sql两个文件中指定内容替换,最后另存问修改后的同名文件
- 如何用JCreator中Debug功能监视形参的变化
this只是指向了本身,即你参数的作用域
modifyButton.addActionListener(new ActionListener())
即 new ActionListener())this 则是 这个ActionListener对象
当前的对象是new ActionListener(),所以this 指向它