# How to create button that makes lines of text appear randomly

**URL:** <https://discourse.processing.org/t/how-to-create-button-that-makes-lines-of-text-appear-randomly/25017>\
**Category:** Coding Questions\
**Created:** [October 29, 2020, 3:53pm UTC](https://discourse.processing.org/t/how-to-create-button-that-makes-lines-of-text-appear-randomly/25017 "2020-10-29T15:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreabirdflies](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dreabirdflies](https://discourse.processing.org/u/dreabirdflies)\
**Post date:** [October 29, 2020, 3:53pm UTC](https://discourse.processing.org/t/how-to-create-button-that-makes-lines-of-text-appear-randomly/25017/1 "2020-10-29T15:53:42Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

Wondering how to do this?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 29, 2020, 4:00pm UTC](https://discourse.processing.org/t/how-to-create-button-that-makes-lines-of-text-appear-randomly/25017/2 "2020-10-29T16:00:30Z")

</div>

Hello and welcome to the forum!

you can make an array for the lines of code and a button.

for random see here: [https://www.processing.org/reference/random\_.html](https://www.processing.org/reference/random_.html)

for button see here: [https://www.processing.org/examples/button.html](https://www.processing.org/examples/button.html)

for lines of code see [https://www.processing.org/tutorials/arrays/](https://www.processing.org/tutorials/arrays/)

Warm regards,

Chrisir
