wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JFileChooser : User selected directory & programmatically created file name : How? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser : User selected directory & programmatically created file name : How?" Watch "JFileChooser : User selected directory & programmatically created file name : How?" New topic
Author

JFileChooser : User selected directory & programmatically created file name : How?

D R Wilkinson
Ranch Hand

Joined: Oct 29, 2004
Posts: 51
I am trying to let the user select the directory they want to save a plain text file in and have the program determine the name of the file. The attempt I have made isn't working and the more I read the API, the more confused I am getting... can anyone help me?



Thank you
[ May 06, 2006: Message edited by: D R Wilkinson ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
seems to work OK in this

D R Wilkinson
Ranch Hand

Joined: Oct 29, 2004
Posts: 51
Thank you,

The problem lay with the char literal '\' not being added correctly.

Solved it by using "\\"

Not sure if this causes a cross platform problem?

Darren
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFileChooser : User selected directory & programmatically created file name : How?