Class is not abstract and does not override abstract method AWT Program

五迷三道 提交于 2019-12-02 10:10:29

Since QuadraticSolver implements ActionListener, it should implement actionPerformed.

You implemented that method in an anonymous class.

To solve it, either add an implementation of actionPerformed to QuadraticSolver or don't require QuadraticSolver to implement that interface.

I Noticed that you implement actionperformed for your actionlistener of your button.When you declare that you are going to implement an interface, you need a separate actionperformed method in your class. like

public class QuadraticSolver implements ActionListener{
@Override 
public void  actionPerformed(ActionEvent){}
}

As you have used ActionListener so you are bound to override its method which is actionPerformed(ActionEvent ae) otherwise it will give this error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!