编译中的一个问题

[复制链接]
查看11 | 回复3 | 2006-9-6 21:14:23 | 显示全部楼层 |阅读模式
我的JDK在编译含有命令按钮程序时会提示这样的错误:
chaxun.java:345: cannot resolve symbol
symbol: class ActionListener
location: class query.chaxun
jButton1.addActionListener(((chaxun)this). new ActionListener() {

^
总是不能识别ActionListener类 请问这是什么原因? 谢谢!
回复

使用道具 举报

千问 | 2006-9-6 21:14:23 | 显示全部楼层
show your code.
回复

使用道具 举报

千问 | 2006-9-6 21:14:23 | 显示全部楼层
jButton1.addActionListener(((chaxun)this). new ActionListener() {

public void actionPerformed(ActionEvent e)

{

jButton1_actionPerformed(e);

}
});
这就是不能编译的部分
回复

使用道具 举报

千问 | 2006-9-6 21:14:23 | 显示全部楼层
you don't know how to use inner class yet. have your class to implement ActionListener, instead of using inner class.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行