Windows上のJFileChooserのデフォルトディレクトリを "My Music"に変更します。 自分のユーザー名がデフォルトC:\Users\Fre\Documents
に設定されているFre
JFileChooserはWindowsのデフォルトディレクトリを変更します
であるため、このディレクトリには、私のアカウントにC:\Users\Fre\Music
である(と思うOSに依存します)。 これを変更するにはどうすればよいですか?
yourFileChooser.setCurrentDirectory(new File
(System.getProperty("user.home") + System.getProperty("file.separator")+ "Music"));
ユーザーの「ミュージック」フォルダが、必ず指定したディレクトリパスにあるとは限りません。ユーザーが簡単に変更できます。 http://www.techsupportalert.com/content/how-move-windows-7-personal-folders-my-documents-another-drive.htm –