Created
July 15, 2013 00:14
-
-
Save brian428/5996720 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pickDirDialog = new JFileChooser( | |
dialogTitle: "Choose directory for the new application", | |
fileSelectionMode: JFileChooser.DIRECTORIES_ONLY, | |
approveButtonText: "Set directory for new application", | |
acceptAllFileFilterUsed: false | |
) | |
result = pickDirDialog.showSaveDialog() | |
if( result == JFileChooser.APPROVE_OPTION ) | |
{ | |
newApplicationPath = pickDirDialog.getSelectedFile() | |
} | |
else | |
{ | |
throw new InvalidUserDataException( "You must choose the parent directory for the new application." ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment