I have an interesting situation when using a JFileChooser FileOpen Dialog. It works 100% on windows, but when I test it on a macbook pro, the app hangs.
Any help would be appreciated. Thanks.
I have a skeleton greenfoot app with pretty much this in it.
private static String previousDirectory = "images";
private static String previousFilename;
public final void readWorld()
{
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File(previousDirectory));
int result = fileChooser.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION)
{
File file = fileChooser.getSelectedFile();
previousDirectory=file.getParentFile().getName();
previousFilename=file.getName();
System.out.println("Selected file: " + previousDirectory + previousFilename );
}
}

