Books1.java:51: BooksMenubar is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
class BooksMenubar implements ActionListener
上面的就是错误的内容提示。.
大家有知道这个是什么错误不?
知道的,希望能指导下,,
万分感谢......在线等~~~~

解决方案 »

  1.   

    其中,BooksMenubar是一个类的名称
      

  2.   

    看问题BooksMenubar是implements了ActionListener(它是一个接口),但是你没有实现接口方法actionPerformed(java.awt.event.ActionEvent)。接口的方法是必须实现的。
      

  3.   

    ActionListener中的actionPerformed(ActionEvent e)方法是一个抽象函数,你没有复写
      

  4.   

    你要覆盖 actionPerformed这个方法!