if you use a jfilechooser the default directory that appears is "my documents"
is it possible to change that to a custom directory? like c:\ ?
changing the jfilechoosers default directory
Started by Shaddix, Oct 02 2009 09:37 AM
1 reply to this topic
#1
Posted 02 October 2009 - 09:37 AM
|
|
|
#2
Posted 03 October 2009 - 01:03 AM
isn't it this:
JFileChooser(String currentDirectoryPath)
Constructs a JFileChooser using the given path. Passing in a null string causes the file chooser to point to the user's default directory. This default depends on the operating system. It is typically the "My Documents" folder on Windows, and the user's home directory on Unix.
Parameters:
currentDirectoryPath - a String giving the path to a file or directory
from: JFileChooser (Java 2 Platform SE v1.4.2))
JFileChooser(String currentDirectoryPath)
Constructs a JFileChooser using the given path. Passing in a null string causes the file chooser to point to the user's default directory. This default depends on the operating system. It is typically the "My Documents" folder on Windows, and the user's home directory on Unix.
Parameters:
currentDirectoryPath - a String giving the path to a file or directory
from: JFileChooser (Java 2 Platform SE v1.4.2))


Sign In
Create Account


Back to top









