I am using javafx.stage.FileChooser
to give the user ability to browse system and save the image he/she wants. this is my code:
Stage fileChooserStage = new Stage();
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Select an Image");
fileChooser.getExtensionFilters().add( new ExtensionFilter("Image Files", "*.png", "*.jpg", "*.gif"));
File file = fileChooser.showSaveDialog(fileChooserStage);
Now i need to save the image that the user chooses in a package(folder which is in the same directory as my packages),How should i do this?