Dies ist eine alte Version des Dokuments!
JFileChooser/Datei öffnen Dialog (Open file)
JFileChooser fc = new JFileChooser(); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); fc.setMultisSelctionEnabled(false); fc.setCurrentDirectory(System.getProperty("user.home")); if (fc.showDialog(this, "Datei öffnen") == JFileChooser.APPROVE_OPTIONS) { System.out.println(fc.getSelectedFile().getAbsoluteFile()); }