Java Method Call Expected

后端 未结 7 1215
隐瞒了意图╮
隐瞒了意图╮ 2020-12-17 18:49

This is a java program with two buttons used to change an integer value and display it. However in IntelliJIDEA the two lines with

increase.addActionListene         


        
相关标签:
7条回答
  • 2020-12-17 19:34

    incListener and decListener are a classes but not a methods, so you must call new to use them, try this:

    increase.addActionListener(new incListener()); decrease.addActionListener(new decListener());

    sorry for my bad english

    0 讨论(0)
提交回复
热议问题