import javax.swing.*; import java.io.*; public class Failivalik{ public static void main(String argumendid[]){ JFileChooser valija=new JFileChooser(new File(".")); valija.showOpenDialog(new JFrame()); System.out.println("Valiti "+valija.getSelectedFile()); } }