/** handle the action event */ protected void handleToDefaultFolderAction() throws Exception { if (!defaultFolderSpecified()) { String message = "A default folder has not been specified. Would you like to specify one now?\n"; if (_subfolderName != null) { message += "Note that you will be specifying the parent folder of " + _subfolderName + ".\n"; message += _subfolderName + " under the selected folder will hold your files."; } final int confirm = JOptionPane.showConfirmDialog( _view, message, "Specify Default Folder", JOptionPane.YES_NO_OPTION); try { switch (confirm) { case JOptionPane.YES_OPTION: if (!showDefaultFolderSelector()) return; break; default: return; } } catch (Exception exception) { exception.printStackTrace(); } } applyDefaultFolder(_activeFileChooser); }