static void inputFilePath(fS msg, fO action) { inputFilePath(msg, userDir(), action); } // action: voidfunc(File) static void inputFilePath(fS msg, final File defaultFile, fO action) { awt { final JTextField tfPath = jtextfield(f2s(or(defaultFile, userDir()))); S title = joinStrings(" | ", msg, programName()); JComponent form = showFormTitled(title, unnull(msg), centerAndEast(tfPath, jbutton("Browse...", r { JFileChooser fileChooser = new JFileChooser(getTextTrim(tfPath)); if (fileChooser.showOpenDialog(tfPath) == JFileChooser.APPROVE_OPTION) { tfPath.setText(fileChooser.getSelectedFile().getAbsolutePath()); tfPath.requestFocus(); } })), r { callF(action, new File(getTextTrim(tfPath))) }); renameSubmitButton(form, "OK"); } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment