SAE21_2023/EssaiChoixFichier.java
2024-04-30 13:51:32 +02:00

15 lines
399 B
Java

import java.io.File;
import java.io.PrintWriter;
import java.io.FileWriter;
import java.io.IOException;
import javax.swing.JFileChooser;
class EssaiChoixFichier {
public static void main(String[] arg) throws IOException {
JFileChooser dialogue = new JFileChooser(new File("."));
if (dialogue.showOpenDialog(null)==JFileChooser.APPROVE_OPTION) {
dialogue.getSelectedFile();
}
}
}