• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
gunes kuday
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mohamed Sanaulla
Bartender
Posts: 3166
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!