Forums Register Login

How to download a file using dynamic download path name using FileChooser

+Pie Number of slices to send: Send
I have a FileChooser:




and a downloadIcon method:




But as you can see, it downloads only to "C:\android\tempcolor\icon.png". I want to download it to path where I chose in FileChooser with the name and extension I choose. In short, how can I use dynamic file path names in where ever I want in my applications?
+Pie Number of slices to send: Send
You should modify the JFileChooser a bit so that you can get the location to save the file. Try this:


Then the path where you would download the file can be obtained by using the code you have provided i.e
Get off me! Here, read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4330 times.
Similar Threads
saving text file as html file
How to save file, using JFIleChooser?
FileDialog save as FREEZE ?!?!
File Path handling on Button event
Correctly implementing save with JFileChooser
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:10:32.