private void bt_enregistrer_eleveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_enregistrer_eleveActionPerformed
int selectedrow = t_eleves.getSelectedRow();
if (t_eleves.getSelectedRow() != -1) {
Eleve e = ((Promotion) l_promos.getSelectedValue()).getEleves().get(t_eleves.getSelectedRow());
e.setNom(tb_nom_eleve.getText());
e.setPrenom(tb_prenom_eleve.getText());
e.setEmail(tb_email_eleve.getText());
e.setNum(tb_num_eleve.getText());
e.save();
// refresh la liste d eleve
belves.unbind();
belves.bind();
// mais le focus sur l eleve
if (selectedrow < t_eleves.getRowCount()) {