gpt4 book ai didi

java - 抽象 Action 的实现

转载 作者:行者123 更新时间:2023-12-01 23:29:58 26 4
gpt4 key购买 nike

由于错误,它不会让我运行该程序:类型BingoHelper必须实现继承的抽象方法ActionListener.actionPerformed(ActionEvent)

public class BingoHelper extends JFrame implements WindowListener, ActionListener{
JButton b = new JButton(new AbstractAction("Enter"){

public void actionPerformed (ActionEvent e){

最佳答案

BingoHelper 类未实现 actionPerformed。扩展 AbstractAction 的匿名类确实实现了它,但它不是同一件事。

关于java - 抽象 Action 的实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19482244/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com