r/JavaFX • u/userr6785 • May 25 '21
How do you read a file using javafx?
Hi, does anyone know how to read a CSV file through JavaFX in an Action event?
2
Upvotes
1
u/ebykka May 26 '21
I do loading of JSON files in the next way
Line 203 method onLoadFromFile
is triggered in line 150
1
u/userr6785 May 26 '21
Thank you! Is it possible to automatically save the text to a file without them choosing one?
1
u/ebykka May 26 '21
Of cause, but you will need to know the file path upfront.
1
u/userr6785 May 26 '21
Yes, I added the file path however when I try to code it using "normal" java it doesn't work at all
4
u/Ging4bread May 25 '21
Using normal Java when you click on the button