Answers for "filedialog java example"

0

java filedialog

FileDialog fd = new FileDialog(yourJFrame, "Choose a file", FileDialog.LOAD);
fd.setDirectory("C:\\");
fd.setFile("*.xml");
fd.setVisible(true);
String filename = fd.getFile();
if (filename == null)
    System.out.println("You cancelled the choice");
else
    System.out.println("You chose " + filename);
Posted by: Guest on August-12-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language