void select(ActionEvent event){
FileChooser fc=new FileChooser();
File selectedfile = fc.showOpenDialog(null);
fc.setInitialDirectory(new File("C:/Users/com/Downloads"));
if(selectedfile!=null) {
findtext.setText(selectedfile.getName());
ffff=new File(selectedfile.getAbsolutePath()).getAbsolutePath();
}
else{
ffff = new File("src/sample/media/JavaFX Splash Screen - Welcome Screen (Inside Same Window).mp4").getAbsolutePath();
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.