Re: saving an output file



On 27 Jun 2005 06:54:00 -0700, aeh wrote:

> Is there any way to save the output file to a user specified directory?
> I would like for the user to be able to select a directory and save the
> output file there.

See FileDialog[1] or JFileChooser[2].

[1] <http://java.sun.com/j2se/1.5.0/docs/api/java/awt/FileDialog.html>
[2] <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFileChooser.html>

>..At the very least, is there any way to specify where
> the file is saved by writing it into the code.

Their is no place like System.getProperty("user.home") [3]

[3]
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperty(java.lang.String)>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
.



Relevant Pages

  • Re: saving an output file
    ... > Is there any way to save the output file to a user specified directory? ... > can specify where the file is created by doing something like this ... Prev by Date: ...
    (comp.lang.java.help)
  • saving an output file
    ... Is there any way to save the output file to a user specified directory? ... can specify where the file is created by doing something like this ... Prev by Date: ...
    (comp.lang.java.help)