I want to change the default directory of my JFileChooser to \"My Music\" on Windows. This directory is C:\\Users\\Fre\\Music on my account because my username is <
C:\\Users\\Fre\\Music
You can use the API method setCurrentDirectory when initializing your JFileChooser objects:
public void setCurrentDirectory(File dir)
Sample usage might be like:
yourFileChooser.setCurrentDirectory(new File (System.getProperty("user.home") + System.getProperty("file.separator")+ "Music"));