We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'd like to temporarily put a 'dialog box' on the screen to ask the user for some information (from the keyboard). Upon detecting ENTER I would then restore the original pixels. I have searched 'examples' and the forum, but have not yet discovered an answer - sorry if I've missed something obvious. I'd prefer to keep the saved area in memory, but if it's necessary I could save/restore using a temporary file.
Answers
Dialog boxes w/ JOptionPane:
http://docs.oracle.com/javase/8/docs/api/javax/swing/JOptionPane.html
We can get a canvas snapshot via get(): http://processing.org/reference/get_.html
Thank You! Great answers! I wasn't aware of showInputDialog (or any of the machinery that goes with it), but it is (almost) the perfect answer for my need (and for another user input problem that just showed up this morning) -- except for the flaw that it doesn't work in 'Present' mode. I notice, from a bit of googling, that you have handed out this solution (including a password variation) for quite a few years, which I missed 'cuz I was searching for 'save/restore area' (not 'dialog box'), thinking that that was where I needed to start (and the get/set descriptions don't mention that concept, so they don't show up in a search).
I'm amazed at how far I've come along in just a week, starting from ground-zero in terms of knowledge of processing, with (of course!) the help of a great many people who, like you, have offered their knowledge on the web. Thanks again for your help.