• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

file saving

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Netbeans IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply....
But here this is not actually working for me...
 
Nitin Surana
Ranch Hand
Posts: 129
Netbeans IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7389
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7389
170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim Moores....
I was trying it through the wrong path
thanks again
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic