Custom class that extends PGraphics class not working

One more thing, if you are using Idea / Eclipse or similar, you could use callbacks as I show in "Variable in variable"/putting a variable in the name behind void / calling methods by name

That way you don’t need to use abstract in your class, you can just tell the button which function to call when it’s pressed. (this would not work in the Processing IDE)