Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

file saving  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I need to save a zip file to a specified folder using the FileDialog window...actually in my applet application i downloaded a number of files and zipped them all in a single zip file in my temp folder...but i want this zip file to be saved in any other folder instead of saving it to temp folder, by showing the save dialogue window...from which the user can choose a desired folder to save this file.... can i use FileDialog() for this??
please do help me...
 
Ranch Hand
Posts: 129
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally would have preferred using a JFileChooser which can be configured to select files or directories.

And here is a good example of JFileChooser, if you need.

http://www.onlinexamples.com/showfullexample.action?idexamples=81&title=Display%20Image%20In%20Jlabel%20Within%20A%20Jpanel
 
Nijin puthiya purayil
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply....
But here this is not actually working for me...
 
Nitin Surana
Ranch Hand
Posts: 129
Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless signed, an Applet can't interact with the local filesystem.
 
Nijin puthiya purayil
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Darryl Burke wrote:Unless signed, an Applet can't interact with the local filesystem.


I'm using signed applet ...but still not getting the result....can i save a file before writing contents into it?
 
Saloon Keeper
Posts: 4757
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to tell us what *is* happening, and what you were expecting to happen instead. Seeing the related code would also help.
 
Nijin puthiya purayil
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code to zip the files...
the name comes from a list...there is now two files in the name filed, and it can be more than two...here i want to save the zipFile to any folder using the JFileChooser instead of saving it to the temp folder..in my code i saved it in the temp folder..
Here the zipping action works fine and the file is saved with the name zipdemo.zip in the temp folder...

 
Tim Moores
Saloon Keeper
Posts: 4757
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not following - if you don't want to save the file in the temp directory, why are you doing so? You've already been pointed to an example of using a JFileChooser to select a different directory; what stops you from doing that?
 
Nijin puthiya purayil
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim Moores....
I was trying it through the wrong path
thanks again
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!