// action: voidfunc(File) static void inputFilePath(S msg, fO action) { final JTextField tfPath = jtextfield(userHome()); S title = joinStrings(" | ", msg, programName()); showFormTitled(title, unnull(msg), tfPath, "", jbutton("Browse...", r { JFileChooser fileChooser = new JFileChooser(getTextTrim(tfPath)); if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) tfPath.setText(fileChooser.getSelectedPath()); }), r { callF(action, new File(getTextTrim(tfPath))) }); }