# The button code will not run with the rest of the code

**URL:** <https://discourse.processing.org/t/the-button-code-will-not-run-with-the-rest-of-the-code/6308>\
**Category:** Libraries\
**Created:** [December 4, 2018, 10:18pm UTC](https://discourse.processing.org/t/the-button-code-will-not-run-with-the-rest-of-the-code/6308 "2018-12-04T22:18:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [December 7, 2018, 12:58am UTC](https://discourse.processing.org/t/the-button-code-will-not-run-with-the-rest-of-the-code/6308/2 "2018-12-07T00:58:55Z")

</div>

Please don’t post closely related posts / duplicates. If you have one big piece of code and several closely related questions about it, post them in a single discussion – in this case, your first one here:

> [@Trying to add this code for a button but its not running correctly](https://discourse.processing.org/t/trying-to-add-this-code-for-a-button-but-its-not-running-correctly/6305):
>
> This is code for my project one tab is called Music Project and the other is called star. I also have another file which contains code for the button that can be pushed to stop and play music. The button code on its own works fine, however when I try to add it to my project code I get errors and the code will not run. I know for sure the button code can be added and it will work but I’m not adding it correctly. I have tried moving the code around make sure that its put in the draw statement, put…

---

_[View the full topic](https://discourse.processing.org/t/the-button-code-will-not-run-with-the-rest-of-the-code/6308)._
