static void inputText(fS msg, fO action) { inputText(msg, "", action); } // action: voidfunc(S) svoid inputText(fS msg, final S defaultText, fO action) { fO threadInfo = _threadInfo(); awt { final JTextField tf = jtextfield(defaultText); S title = joinStrings(" | ", msg, programName()); JComponent form = showFormTitled(title, unnull(msg), tf, r { vmBus_send('inputtingText_OK, threadInfo, msg, tf); callF_thread(action, getTextTrim(tf)) }); renameSubmitButton(form, "OK"); vmBus_send('inputtingText, threadInfo, msg, tf); } } svoid inputText(S msg, S defaultText, IVF1 action) { inputText(msg, defaultText, (O) action); }