private void jButtonChangeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonChangeActionPerformed
        try {
            // TODO add your handling code here:
            char[] mdp = jPasswordFieldOldPass.getPassword();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < mdp.length; i++) {
                sb.append(mdp[i]);
            }
            String oldpass = sb.toString();
            
            mdp = jPasswordFieldNewPass.getPassword();
             sb = new StringBuilder();
            for (int i = 0; i < mdp.length; i++) {
                sb.append(mdp[i]);
            }
            String newpass = sb.toString();
            
            mdp = jPasswordFieldConfPass.getPassword();
             sb = new StringBuilder();
            for (int i = 0; i < mdp.length; i++) {
                sb.append(mdp[i]);
            }
            String confpass = sb.toString();
            
            Bibliothecaire intermed = MetierServiceFactory.getAdherentService().newBibliothecaire(bibliothecaire.getNom(), bibliothecaire.getPrenom(), bibliothecaire.getLogin(), oldpass, false);
            if(intermed.getMotDePasse().equals(bibliothecaire.getMotDePasse())) {
                if(newpass.equals(confpass)) {
                    if(!newpass.equals(oldpass)) {
                        editBiblio.setMdpEdited(newpass);
                        jLabelStatut.setText("<html><body><font color='green'>Votre demande a été prise en compte</font></body></html>");
                        editBiblio.setStatut("<html><body><font color='orange'>Modification du mot de passe en attente...</font></body></html>");
                        this.dispose();
                    }else{
                        jLabelStatut.setText("<html><body><font color='red'>Ancien et nouveau mot de passe doivent être différents</font></body></html>");
                    }
                }else{
                    jLabelStatut.setText("<html><body><font color='red'>Les deux mots de passe doivent être identiques</font></body></html>");
                }
            }else{
                jLabelStatut.setText("<html><body><font color='red'>Ancien mot de passe incorrect</font></body></html>");
            }
        } catch (Exception ex) {
            Logger.getLogger(ChangePass.class.getName()).log(Level.SEVERE, null, ex);
        }        
    }//GEN-LAST:event_jButtonChangeActionPerformed