“Dialog File Java” Kode Jawaban

Dialog File Java

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);
This is my name

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);
This is my name

Dialog File Java


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);

Grotesque Gentoo

Jawaban yang mirip dengan “Dialog File Java”

Pertanyaan yang mirip dengan “Dialog File Java”

Lebih banyak jawaban terkait untuk “Dialog File Java” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya