boolean () { if (myPathTextField == null) return false; final String path = myPathTextField.getTextFieldText(); return path != null && new File(path.trim()).exists() && myFileName.getText().trim().length() > 0; }