Other |
---|
1.4.0 betaFixed |
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
Name: aaR10142 Date: 12/25/2000 JFileChooser constructors by default set current dirrectory to the "Desktop" value on Windows, but should use user.home property instead. javadoc says: "public JFileChooser() Constructs a JFileChooser pointing to the user's home directory. " See example ---------- CtorTests.java ---------------- import javax.swing.*; public class CtorTests { public static void main(String argv[]) { JFileChooser c = new JFileChooser(); // Create JFileChooser object System.out.println("Current dir is "+c.getCurrentDirectory()); System.out.println("Home dir is " + System.getProperty("user.home")); } } ------------- output ------------------------- Current dir is Desktop Home dir is C:\WINNT\Profiles\fda ======================================================================
|