# Best Way of Mixing in UI Elements?

**URL:** <https://discourse.processing.org/t/best-way-of-mixing-in-ui-elements/5979>\
**Category:** Libraries\
**Created:** [November 26, 2018, 10:33pm UTC](https://discourse.processing.org/t/best-way-of-mixing-in-ui-elements/5979 "2018-11-26T22:33:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MauiMana](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@MauiMana](https://discourse.processing.org/u/MauiMana)\
**Post date:** [November 26, 2018, 10:33pm UTC](https://discourse.processing.org/t/best-way-of-mixing-in-ui-elements/5979/1 "2018-11-26T22:33:08Z")

</div>

I’m fairly new to ‘processing’ so please forgive me if I’m missing something obvious. I’m needing to add some user interaction to my processing application. At the very minimum I’m looking to be able to pose various questions to the user and use the responses to configure creation of some graphics. And although a simple console-level I/O approach would suffice (which BTW I don’t yet see how one can do), I’d really prefer to employ a more GUI-level approach with dialogue boxes, menus, etc. Can someone point me in the right direction for either of these approaches to a UI. Thank you…

---

<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:** [November 26, 2018, 10:38pm UTC](https://discourse.processing.org/t/best-way-of-mixing-in-ui-elements/5979/2 "2018-11-26T22:38:33Z")

</div>

Hi! What about using one of the available GUI libraries?  
[https://processing.org/reference/libraries/#gui](https://processing.org/reference/libraries/#gui)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 27, 2018, 1:40am UTC](https://discourse.processing.org/t/best-way-of-mixing-in-ui-elements/5979/3 "2018-11-27T01:40:52Z")

</div>

but starting from the basics:  
if you want the processing program ask the user a question try:

```auto
import javax.swing.JOptionPane;
String answer, title = " title: input string ",question="question: tell me something";

// _________________________________________________________________ SETUP
void setup() {
  size(562, 340);
  answer = JOptionPane.showInputDialog(null,question,title, JOptionPane.QUESTION_MESSAGE);
 println(answer);
}

// _________________________________________________________________ DRAW
void draw() {
}

```

but that is about STRING…  
if you want later use that to get (number) Set Point input from user  
must do functions like

> ask\_int  
> ask\_float

from it, add you can build a button menu what ask that questions “on click”

that would be a great way to learn, without starting with a GUI library  
//\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
but that is actually lots of code / work  
i found that there is a very basic input way, like a slider / you just not see it /  
if you need to have 20 variables ( position, size, color ) be adjustable by user  
try the mouseWheel in combination with a keypress.

examples:  
both can get [from here](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=154#here13)
