This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
 
subject: JFileChooser : User selected directory & programmatically created file name : How?
 
Similar Threads
Correctly implementing save with JFileChooser
mulitple file selection using JFileChooser problem
Java operator
loading past information
actionPerformed in frame problem