Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Frame frame = null;
- FileDialog fileBox = new FileDialog(frame, "Open a file", FileDialog.LOAD);
- fileBox.setVisible(true);
- String filename = fileBox.getFile();
- String directoryPath = fileBox.getDirectory();
- File inFile = new File(directoryPath, filename);
- Scanner scanner = new Scanner(inFile);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement