private void downloadAttachmentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadAttachmentButtonActionPerformed
        if (attachmentsComboBox.getSelectedItem() != null){
            JFileChooser filechooser = new JFileChooser();
                filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

                int result = filechooser.showOpenDialog(null);
                if (result == JFileChooser.APPROVE_OPTION) {
                   String path = filechooser.getCurrentDirectory().toString()
            + File.separatorChar + filechooser.getSelectedFile().getName();
                  String fileNameDB = getProposal().getSubject() + "-" + attachmentsComboBox.getSelectedItem().toString();
                  String fileName = attachmentsComboBox.getSelectedItem().toString();
                   if(MongoHelper.download(fileNameDB, path, fileName)){
                   JOptionPane.showMessageDialog(this, "File downloaded!");
                   }
                   else{
                       JOptionPane.showMessageDialog(this,
                "Attachment failed to download",
                "Error",
                JOptionPane.ERROR_MESSAGE);
                   }

                if (result == JFileChooser.CANCEL_OPTION) {
                    // Disregard
                    }
                }
        }
    }//GEN-LAST:event_downloadAttachmentButtonActionPerformed