Ajout d'une icone à l'application

This commit is contained in:
Lucas Vbr
2022-03-07 08:32:45 +01:00
parent e682914346
commit f93d1a8877
7 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ public class SelectionnerFichier {
* fichier PDF
* @return le fichier choisi par l'utilisateur
*/
public static File ouvrirFichier() {
public static File ouvrirFichier(JFrame parent) {
final String TITRE = "Sélectionnez un PDF";
final String DESCRIPTION = "PDF files (*.pdf)";
@@ -62,7 +62,7 @@ public class SelectionnerFichier {
/* Renvoie un File lorsque l'utilisateur appuie sur le bouton Ouvrir */
int returnValue = fileChooser.showOpenDialog(null);
int returnValue = fileChooser.showOpenDialog(parent);
if (returnValue == JFileChooser.APPROVE_OPTION) {
return new File(fileChooser.getSelectedFile().getAbsolutePath());
}