# Custom class that extends PGraphics class not working

**URL:** <https://discourse.processing.org/t/custom-class-that-extends-pgraphics-class-not-working/20199>\
**Category:** Coding Questions\
**Created:** [April 27, 2020, 10:31am UTC](https://discourse.processing.org/t/custom-class-that-extends-pgraphics-class-not-working/20199 "2020-04-27T10:31:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [April 30, 2020, 4:28pm UTC](https://discourse.processing.org/t/custom-class-that-extends-pgraphics-class-not-working/20199/4 "2020-04-30T16:28:16Z")

</div>

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](https://discourse.processing.org/t/variable-in-variable-putting-a-variable-in-the-name-behind-void-calling-methods-by-name/16935/8)

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)

---

_[View the full topic](https://discourse.processing.org/t/custom-class-that-extends-pgraphics-class-not-working/20199)._
