The method ActionListener(ActionListener)in the type AbstractButton is not applicable for the arguements(ButtonDemo)不明白说的是什么意思 根据你的报错,我怀疑ButtonDemo类实现的ActionListener接口不是java.awt.event.ActionListener,而是一个自定义的重名类根据两点推测 ActionPerformed方法实现了接口中方法 ButtonDemo有黄色警告
jbtStart.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
thread.start();
jbtStart.setEnabled(false);
}
});
ActionPerformed方法实现了接口中方法
ButtonDemo有黄色警告