Je veux transformer un bouton parcourir afin qu'il puisse choisir un dossier.g essayer ce code mais ça ne marche pas.il choisit des fichiers:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
 private void jButton1_actionPerformed(ActionEvent e) {
                 JFileChooser choix = new JFileChooser();
                 int retour =choix.showOpenDialog(this);
 
                          if (retour == JFileChooser.APPROVE_OPTION) {
                              choix.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                              choix.getSelectedFile();
                              String t=choix.getSelectedFile().getAbsolutePath();
                             mod.setText(t);
}
est ce que qq1 a une idée?