java filedialog

Solutions on MaxInterview for java filedialog by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "java filedialog"
Greta
22 Aug 2019
1FileDialog fd = new FileDialog(yourJFrame, "Choose a file", FileDialog.LOAD);
2fd.setDirectory("C:\\");
3fd.setFile("*.xml");
4fd.setVisible(true);
5String filename = fd.getFile();
6if (filename == null)
7    System.out.println("You cancelled the choice");
8else
9    System.out.println("You chose " + filename);