How to make the user to select the file from only specified folder
int returnVal = fc.showOpenDialog(FileChooser.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
source = file.getAbsolutePath();
fileName = file.getName();
attachText.setText(fileName);
source = source.replace("\\","\\\\");
}
Here I will get the file from any folder, where I want the file only from G:\Project\Attachments. How Can i do this?