private void groupListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_groupListValueChanged

        int indx = groupList.getSelectedIndex() - 1;
        //System.out.println("old: " + oldIndx + " new: " + (indx + 1));
        if (indx + 1 == oldIndx) {
            return;
        }

        //System.out.println(editingAct);

        transferChanges();
        //System.out.println(editingAct);

        int n = 0;
        //see if updated
        if (!groupNameBox.getText().equals("")
                && (editingFilt != null
                && !editingFilt.equals(original))) {
            //request confirmation of swtiching with unwritten changes
            //all done
            n = confirmDiscard();
        }

        //they wanted to go ahead and change
        if (n == 0) {

            if (indx == -1) {
                editingFilt = new Group(manager.getUId(), "", 0, null);
                original = (Group) editingFilt.clone();
            } else if (indx >= 0) {
                original = manager.getGroup(groupNames[indx + 1]);

                editingFilt = (Group) original.clone();
            }
            setFields();
            oldIndx = indx + 1;
            successLabel.setVisible(false);
        } else {
            groupList.setSelectedIndex(oldIndx);
        }
    }//GEN-LAST:event_groupListValueChanged