15 lines
399 B
Java
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();
|
|
}
|
|
}
|
|
} |