JTableBinding belves;
JListBinding bpromos;
private void initBindings() {
BindingGroup bg = new BindingGroup();
bpromos = SwingBindings.createJListBinding(AutoBinding.UpdateStrategy.READ,
GestionPromotion.getInstance().getPromotions(), l_promos);
bg.addBinding(bpromos);
AutoBinding btextpromo = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, l_promos,
(Property) BeanProperty.create("selectedElement.libelle"), tb_libelle_promo, (Property) BeanProperty.create("text"));
bg.addBinding(btextpromo);
btextpromo.setSourceUnreadableValue("");
belves = SwingBindings.createJTableBinding(AutoBinding.UpdateStrategy.READ_WRITE, l_promos, (Property) BeanProperty.create("selectedElement.eleves"), t_eleves);
belves.addColumnBinding(BeanProperty.create("nom")).setColumnName("Nom").setEditable(false).setColumnClass(String.class);
belves.addColumnBinding(BeanProperty.create("prenom")).setColumnName("Prénom").setEditable(false).setColumnClass(String.class);
belves.addColumnBinding(BeanProperty.create("email")).setColumnName("Email").setEditable(false).setColumnClass(String.class);
belves.addColumnBinding(BeanProperty.create("num")).setColumnName("Numéro").setEditable(false).setColumnClass(String.class);
bg.addBinding(belves);
AutoBinding nom_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ_WRITE, t_eleves,
(Property) BeanProperty.create("selectedElement.nom"), tb_nom_eleve, (Property) BeanProperty.create("text"));
nom_e.setSourceUnreadableValue("");
AutoBinding prenom_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
(Property) BeanProperty.create("selectedElement.prenom"), tb_prenom_eleve, (Property) BeanProperty.create("text"));
prenom_e.setSourceUnreadableValue("");
AutoBinding email_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
(Property) BeanProperty.create("selectedElement.email"), tb_email_eleve, (Property) BeanProperty.create("text"));
email_e.setSourceUnreadableValue("");
AutoBinding num_e = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ, t_eleves,
(Property) BeanProperty.create("selectedElement.num"), tb_num_eleve, (Property) BeanProperty.create("text"));
num_e.setSourceUnreadableValue("");
bg.addBinding(nom_e);
bg.addBinding(prenom_e);
bg.addBinding(email_e);
bg.addBinding(num_e);
bg.bind();
}