!7 p-noconsole { final JTextField snippetID = snippetIDChooser(); final JLabel title = jAutoSnippetTitle(snippetID); final JTextField newTitle = jtextfield(); renameSubmitButton("Rename snippet", showForm(+snippetID, +title, +newTitle, func -> bool { final JButton button = heldInstance(JButton); disableButton(button); thread { try { S s = renameSnippet(getText(snippetID), getTextTrim(newTitle)); bool ok = swic(s, "OK"); infoBox(ok ? "Renamed!" : "Error: " + s); if (ok) disposeWindow(button); } finally { enableButton(button); } } false; // don't hide form immediately })); }