# JButtons in processing

**URL:** https://discourse.processing.org/t/jbuttons-in-processing/28641
**Category:** Coding Questions
**Created:** [March 18, 2021, 8:11pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641 "2021-03-18T20:11:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [March 18, 2021, 8:11pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641/1 "2021-03-18T20:11:52Z")

</div>

Hello everyone, I am making a simple application that requires a lot of buttons, and I want to be able to use the JButton class in order to do so. However, I don’t know how to do this because traditionally to make a JButton in Java you have to add it to a JFrame. Any ideas on how to implement the JButton class?

---

<div class="post-metadata">

### Author: ![canslp](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@canslp](https://discourse.processing.org/u/canslp)
#### Post date: [March 18, 2021, 9:13pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641/2 "2021-03-18T21:13:10Z")

</div>

is there a reason you can’t add it to a JFrame

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [March 18, 2021, 10:32pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641/3 "2021-03-18T22:32:24Z")

</div>

Have you tried the processing libraries controlp5 or g4p. They are designed for ui creation. Im working on my own gui lib which you are welcome to make use of just need a couple of days to finish it up. But honestly a tried and tested lib just like the ones above might be a better idea.

---

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [March 19, 2021, 4:53pm UTC](https://discourse.processing.org/t/jbuttons-in-processing/28641/4 "2021-03-19T16:53:10Z")

</div>

that would create a separate window and I don’t want that.
