Custom class that extends PGraphics class not working

I think calling super() is not necessary in this case, see Self contained layers by extending PGraphics

But I did need to call setParent(), setPrimary() and setSize().

Ah looking at the code, I’m not sure the PGraphics can draw itself onto the main canvas. Can’t you call image(theButton, 20.0, 20.0) from whoever owns this Button?