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.
Page Index Toggle Pages: 1
Input text (Read 1209 times)
Input text
Nov 10th, 2006, 7:11pm
 
Hi.

I'm trying to write a simulation which saves/opens a data file containing the current state of the simulation. However, I want the user to input the filename. I've been able to use JOptionPane to prompt at the beginning, with the line:

String Location = javax.swing.JOptionPane.showInputDialog("File Location");

in setup. However, this doesn't work when I try to use it in the middle of the simulation - the program locks up and I have to kill the process. Is there a way to have a popup dialog where I can input text, or just a way to input text in general. I guess I want to avoid swing...

On a side note, some browsing on the forums tells me that swing and Processing don't work all that well together, along with lots of posts of "check the tutorial." I have been unable to locate this tutorial...can someone link?

Thanks
Re: Input text
Reply #1 - Nov 10th, 2006, 8:13pm
 
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1163097743
Page Index Toggle Pages: 1