Ich bin neu in JavaFx, ich frage mich, wie man eine Datei, die bereits von Filechooser ausgewählt wurde, in meinen Projektordner kopiert.Kopiere die ausgewählte Datei in das Projektverzeichnis
public void ButtonAction(ActionEvent event) {
FileChooser fc = new FileChooser();
fc.setTitle("attach a file");
File selectedFile = fc.showOpenDialog(null);
if (selectedFile != null) {
file1.setText("selectionned file : " + selectedFile.getAbsolutePath());
//the code to copy the selected file goes here//
} else{
file1.setText("no file attached");
}