据我所知ActionListener是个Interface,是不能够产生实例的。
应该给组件注册事件监听器(ActionListener)。
例如:
Button b;
……
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//此处写按钮按下时的动作
}
});
应该给组件注册事件监听器(ActionListener)。
例如:
Button b;
……
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//此处写按钮按下时的动作
}
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货