Java Method Call Expected

后端 未结 7 1338
隐瞒了意图╮
隐瞒了意图╮ 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:15

    incListener and declListener are classes, not methods.

    Try

    increase.addActionListener(new incListener());
    

    btw, rename your classes names to make them start with an uppercase

提交回复
热议问题