private void jBrechercheActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jBrechercheActionPerformed
    // TODO add your handling code here:
    TheatreDAO tdao = new TheatreDAO();
    Theatre tresultat = new Theatre();

    tresultat = tdao.findtheatreBynom(jTFrecherche.getText());

    System.out.println("" + tresultat.toString());

    if ((tresultat.getNom_theatre() != null)
        && (tresultat.getAdresse_théatre() != null)
        && (tresultat.getDescription_theatre() != null)) {
      jTfnomsoiree.setText(tresultat.getNom_theatre());
      jTFadresse.setText(tresultat.getAdresse_théatre());
      jTAdescrip.setText(tresultat.getDescription_theatre());
      jXDatePickerdatesoiree.setDate(tresultat.getDate_theatre());

      JOptionPane.showMessageDialog(this, "recherche effectuée avec succès :");
    } else {

      JOptionPane.showMessageDialog(
          this, "Nom théatre inexistant", "Recherche nom soirée", JOptionPane.WARNING_MESSAGE);
    }
  } // GEN-LAST:event_jBrechercheActionPerformed
  private void jTable1MouseClicked(
      java.awt.event.MouseEvent evt) { // GEN-FIRST:event_jTable1MouseClicked
    // TODO add your handling code here:
    int ligne_selectionee = jTable1.getSelectedRow();
    int id = (int) jTable1.getValueAt(ligne_selectionee, 0);

    TheatreDAO tdao = new TheatreDAO();

    Theatre t = new Theatre();
    t = tdao.findtheatreByID(id);

    jTfnomsoiree.setText(t.getNom_theatre());
    jTAdescrip.setText(t.getDescription_theatre());
    jTFadresse.setText(t.getAdresse_théatre());

    java.sql.Date date = t.getDate_theatre();

    java.util.Date d = (java.util.Date) date;
    jXDatePickerdatesoiree.setDate(d);
  } // GEN-LAST:event_jTable1MouseClicked