The button listener class doesn't know about the buttons because they aren't in it's scope. What you can do is pass them as parameters to the constructor of your button listener:


public...