P
P
Paul Fawkes2019-05-21 20:29:25
macOS
Paul Fawkes, 2019-05-21 20:29:25

JFileChooser not working on mac os?

fFileChooser opened the folder perfectly on windows, on macos it doesn't want to, the cursor just spins endlessly and nothing happens.

public void getDir() {
        chooser = new JFileChooser();
        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        chooser.showSaveDialog(null);
        String fileLocation = String.valueOf(chooser.getSelectedFile());
        File dir = new File(fileLocation);
        readFiles(dir);

        }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question