Results 1 to 3 of 3
Thread: jFilechooser
- 04-26-2012, 09:06 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 1
- Rep Power
- 0
jFilechooser
I'm trying to figure out how to have a user enter in a filename not select one using the mouse but entering in a new filename and have that name be saved into the current directory. I have look at getSelectedFile examples but it seems that those examples only have the user selecting a file for the directory listing. what i need is one that allows the user to enter in a new file name. thanks to all that can help
- 04-26-2012, 10:42 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,608
- Rep Power
- 5
Re: jFilechooser
You don't provide any code for guidance, which doesn't help us help you. Did you use the JFileChooser method showSaveDialog? (and please spell correctly, jfilechooser != JFileChooser - we are programmers, and oftentimes our brains work like compilers, meaning jfilechooser does not compile)
- 04-27-2012, 04:06 AM #3
Re: jFilechooser
JFileChooser allows entering a file name. To create a new file, look at the methods of the File class.
There are also other ways to create a file. You may find some here: File I/O (Featuring NIO.2) (The Java™ Tutorials > Essential Classes > Basic I/O)
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
jFileChooser
By ArneBassez in forum AWT / SwingReplies: 7Last Post: 12-01-2010, 04:38 AM -
Jfilechooser
By greatmajestics in forum Java 2DReplies: 5Last Post: 03-30-2010, 06:13 PM -
help with JFileChooser
By morgatron in forum New To JavaReplies: 1Last Post: 01-08-2010, 09:00 AM -
JfileChooser Help
By simmi in forum AWT / SwingReplies: 9Last Post: 08-04-2009, 02:24 AM -
how to use JFileChooser
By tommy in forum New To JavaReplies: 1Last Post: 08-06-2007, 08:49 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks