private void updateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateBtnActionPerformed
        successLabel.setVisible(false);
        if (activityNameBox.getText() == null
                || activityNameBox.getText().equals("")) {
            //we don't want to do anything

            //custom title, warning icon
            JOptionPane.showMessageDialog(this,
                    "No activity name specified. Update failed.",
                    "Missing name",
                    JOptionPane.WARNING_MESSAGE);

            return;
        }

        transferChanges(true);

        int indx = activityList.getSelectedIndex() - 1;
        //.out.println(editingAct);
        //if(indx >= 0) System.out.println(activities[indx]);

        if ((editingAct != null
                && !editingAct.equals(original))) {

            int n = 0;
            //System.out.println(original);
            if (original != null
                    && !editingAct.getName().equals(original.getName())
                    && original.getName() != null) {

                //System.out.println(editingAct.getName() + " " + oldIndx);
                //have a name, name differs, and not changing index

                Object[] options = {"Yes", "Cancel"};
                n = JOptionPane.showOptionDialog(this,
                        "This will edit the name of the current activity.\n"
                        + "Are you sure you wish to continue?",
                        "Activity name change",
                        JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.QUESTION_MESSAGE,
                        null,
                        options,
                        options[1]);
            }
            if (n == 0) {

                //write local object to db & update user
                //MongoHelper.save(editingAct, MongoHelper.ACTIVITY_COLLECTION);
                manager.updateActivity(editingAct);
                original = (Activity) editingAct.clone();
                getActivities();

                successLabel.setVisible(true);
            }
        } else {
            successLabel.setVisible(true);
        }

    }//GEN-LAST:event_updateBtnActionPerformed