We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms ›  Processing sketches for user prompted text
Page Index Toggle Pages: 1
 Processing sketches for user prompted text (Read 544 times)
 Processing sketches for user prompted text
Sep 19th, 2008, 6:47pm
 
Friends:

Can someone point me to sketches for Processing that do user prompts for textual input and output?

Thanks in advance, -Migs
Re:   Processing sketches for user prompted t
Reply #1 - Sep 19th, 2008, 8:36pm
 
For quick, reliable results, you might want to take a look at the Graphic Interface section of the library page.
Otherwise, for user input, you will process the key events (eg. keyTyped() callback), managing arrows, backspace and delete keys, etc., and providing visual feedback on the sketch.
Re:   Processing sketches for user prompted t
Reply #2 - Sep 22nd, 2008, 12:02pm
 
import javax.swing.JOptionPane;

String s = (String)JOptionPane.showInputDialog(null,
   "Input Data:",
   "Datainputdialog",
   JOptionPane.PLAIN_MESSAGE);


-seltar
Re:   Processing sketches for user prompted t
Reply #3 - Sep 22nd, 2008, 9:04pm
 
Hi Seltar and PhiLho

Thanks for the code and link.  I'll have to study them and try a few examples.

Most grateful, Migs
Page Index Toggle Pages: 1