Commit f7fe451b authored by edmundszagars's avatar edmundszagars
Browse files

-Check if file is selected to set file location

parent fb9e90ae
......@@ -38,8 +38,10 @@ public class MainWindow extends Application {
FileChooser.ExtensionFilter csvFilter = new FileChooser.ExtensionFilter("CSV files (*.csv)", "*.csv");
fileChooser.getExtensionFilters().add(csvFilter);
File file = fileChooser.showOpenDialog(primaryStage);
fileLocation.setText(file.toString());
filePath = fileLocation.getText();
if (file != null) {
fileLocation.setText(file.toString());
filePath = fileLocation.getText();
}
});
CheckBox bubbleSortCheckBox = new CheckBox();
......@@ -129,3 +131,4 @@ public class MainWindow extends Application {
return FXCollections.observableArrayList();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment