private void startButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_startButtonActionPerformed try { if (!selectedFolder.exists()) { int option = DisplayUtils.confirmOkCancel( this, "The selected folder does not exist!!!\n" + "Do you want to create it?", DisplayTypeEnum.INFO); if (JOptionPane.OK_OPTION == option) { selectedFolder.mkdirs(); } else { return; } } documentExtractor.extract(sourceUrlTextField.getText(), targetFolderNameTextField.getText()); } catch (Exception ex) { logger.error(ex); } } // GEN-LAST:event_startButtonActionPerformed
private void browseTargetFolderButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_browseTargetFolderButtonActionPerformed File folder = FileBrowserUtil.openSingleFile( this, null, true, (null != selectedFolder ? selectedFolder.getAbsolutePath() : ".")); if (null != folder) { if (!folder.exists()) { int option = DisplayUtils.confirmOkCancel( this, "The selected folder does not exist!!!\n" + "Do you want to create it?", DisplayTypeEnum.INFO); if (JOptionPane.OK_OPTION == option) { folder.mkdirs(); } else { return; } } selectedFolder = folder; targetFolderNameTextField.setText(folder.getAbsolutePath()); } } // GEN-LAST:event_browseTargetFolderButtonActionPerformed