public void genererTableau(String fonction, ArrayList<Photographe> listeP, ArrayList<Historien> listeH) {
        String entete[] = {"ID", "Choisir " + fonction};
        Photographe p;
        Historien h;
        jTable1.setToolTipText("Double clique pour choisir un utilisateur");
        switch (fonction) {
            case "Photographe":
                jTable1.setModel(new DefaultTableModel(entete, listeP.size()) {
                    public boolean isCellEditable(int row, int column) {
                        return false;
                    }
                });
                for (int i = 0; i < listeP.size(); i++) {
                    p = listeP.get(i);
                    jTable1.setValueAt(p.getIdPhotographe(), i, 0);
                    jTable1.setValueAt(p.getNom(), i, 1);
                }
                break;
            case "Historien":
                jTable1.setModel(new DefaultTableModel(entete, listeH.size()) {
                    public boolean isCellEditable(int row, int column) {
                        return false;
                    }
                });
                for (int i = 0; i < listeP.size(); i++) {
                    h = listeH.get(i);
                    jTable1.setValueAt(h.getIdHistorien(), i, 0);
                    jTable1.setValueAt(h.getNom(), i, 1);
                }

                break;
            default:
                System.out.println("RAS");
        }
    }