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 <
You can Change the default directory of my JFileChooser to "Directory you want" on Windows
JFileChooser fileChooser = new JFileChooser();
fileChooser.setCurrentDirectory(new File("put here your directory"));
int result = fileChooser.showOpenDialog(getParent());
if (result == JFileChooser.APPROVE_OPTION)
{
File selectedFile = fileChooser.getSelectedFile();
jTextField.setText(selectedFile.getAbsolutePath());
}