Java Method Call Expected
incListener and declListener are classes, not methods.
Try
increase.addActionListener(new incListener());
btw, rename your classes names to make them start with an uppercase
It's simple: use new incListener()
instead of incListener()
. The later is trying to call a method named incListener
, the former creates an object from the class incListener
, which is what we want.