Guest User

Untitled

a guest
Feb 20th, 2020
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Frame frame = null;
  2. FileDialog fileBox = new FileDialog(frame, "Open a file", FileDialog.LOAD);
  3. fileBox.setVisible(true);
  4.  
  5. String filename = fileBox.getFile();
  6. String directoryPath = fileBox.getDirectory();
  7.  
  8. File inFile = new File(directoryPath, filename);
  9. Scanner scanner = new Scanner(inFile);
RAW Paste Data