Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JFrame.setDefaultLookAndFeelDecorated(true);
- JDialog.setDefaultLookAndFeelDecorated(true);
- JFileChooser fileChooser = new JFileChooser();
- int returnValue = fileChooser.showOpenDialog(null);
- if (returnValue == JFileChooser.APPROVE_OPTION) {
- File selectedFile = fileChooser.getSelectedFile();
- File testFile = fileChooser.getCurrentDirectory();
- System.out.println(selectedFile.getName());
- System.out.println(testFile);
- System.out.println(testFile.getName()); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement