Beispiel #1
0
 public TGIModifVue(JFrame fenetre, Tgi t) {
   super(fenetre);
   tgi = t;
   setTitle("Modifier TGI");
   this.nomText.setText(t.getNom());
   this.adresseText.setText(t.getAdresse());
   this.telText.setText(t.getTel());
   precedentBouton.addActionListener(this);
   validerBouton.addActionListener(this);
 }
Beispiel #2
0
  @Override
  public void actionPerformed(ActionEvent e) {
    Object source = e.getSource();
    if (source == validerBouton) {
      // Modifications
      tgi.setNom(nomText.getText());
      tgi.setAdresse(adresseText.getText());
      tgi.setTel(telText.getText());
      pagePrecedente.setVisible(true);
      dispose();
    }

    if (source == precedentBouton) {
      this.pagePrecedente.setVisible(true);
      dispose();
    }
  }