Bonjour à tous et à toutes!

J’espère que tout le monde va bien par ici, voilà je suis nouveau ici et amateur de la programmation. Actuellement je suis sur un projet de gestion de personnel avec Java et Mysql. J'ai un problème depuis environs 3 jours. Je n'arrive pas à récupérer la donnée sélectionnée sur ma Jtable pour l'afficher dans un combobox. Par contre sur les textfield ça marche bien mais avec le combo ça ne marche pas.

Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
private void deplace(int i) {
        try {
            txtid.setText(model.getValueAt(i, 0).toString());
            txtnm.setText(model.getValueAt(i, 1).toString());
            txtpr.setText(model.getValueAt(i, 2).toString());
            txtda.setText(model.getValueAt(i, 3).toString());
            txtad.setText(model.getValueAt(i, 4).toString());
            txttel.setText(model.getValueAt(i, 5).toString());
            txtstat.setSelectedItem(model.getValueAt(i, 6).toString());
            txtfnct.setSelectedItem(model.getValueAt(i, 7).toString());
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Erreur de deplacement" + e.getLocalizedMessage());
        }
 
    }
 
 
    private void afficher() {
        try {
            stmt = con.obtenirconnection().createStatement();
            rs = stmt.executeQuery("SELECT * from profil,fonction,statut where fonction.idFonction=profil.idFonction and statut.idStatut=profil.idStatut");
            while (rs.next()) {
                model.addRow(new Object[]{rs.getString("identifiant"), rs.getString("nom"), rs.getString("prenom"), rs.getString("sexe"),
                    rs.getString("adresse"), rs.getString("tel"), rs.getString("nomFonction"), rs.getString("nomStatut")});
            }
            table.setModel(model);
        } catch (SQLException e) {
            System.err.println(e);
        }
 
    }