A container with a lot of buttons exist,where each button has a name which represents an absolute file path.So when the button is dragged to a folder or desktop(let's say in Windows) it is copied by user's Operating System:(Code)
button.setOnDragDetected(event -> {
/* allow copy transfer mode */
Dragboard db = startDragAndDrop(TransferMode.COPY,TransferMode.LINK);
/* put a string on dragboard */
ClipboardContent content = new ClipboardContent();
/*Adding a file into the ClipboardContent*/
content.putFiles(Arrays.asList(new File(getSongPath())));
........
db.setContent(content);
event.consume();
}
The problem:
What i want is when the drop is done to get the folder where the file|files have been dropped..so i can make a progress bar for big files..Here says that it can be done but when i try to get GestureTarget it is null.