# Open console instead of window

**URL:** <https://discourse.processing.org/t/open-console-instead-of-window/31040>\
**Category:** Project Guidance\
**Created:** [July 4, 2021, 11:57am UTC](https://discourse.processing.org/t/open-console-instead-of-window/31040 "2021-07-04T11:57:09Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 4, 2021, 11:33pm UTC](https://discourse.processing.org/t/open-console-instead-of-window/31040/8 "2021-07-04T23:33:37Z")

</div>

Hello,

There is always _javax.swing.JOptionPane_ for simple IO:

```auto
import javax.swing.JOptionPane;

int col;

void setup() {
  }

void draw() {
  background(col); 
  }

void keyPressed() {
  thread("MessageDialog_thread");
  } 

void MessageDialog_thread() {
  String strInp = JOptionPane.showInputDialog(null,"Enter a color 0 to 255:");
  col = int(strInp);
  JOptionPane.showMessageDialog(null, col, "Output", JOptionPane.PLAIN_MESSAGE);
  }

```

`:)`

---

_[View the full topic](https://discourse.processing.org/t/open-console-instead-of-window/31040)._
