Hi, I am using JFileChooser CUSTOM_DIALOG one. Here is the snippet of the code :
fileChoose = new JFileChooser(); fileChoose.setDialogType(JFileChooser.CUSTOM_DIALOG); fileChoose.setMultiSelectionEnabled(false); fileChoose.setFileSelectionMode(JFileChooser.FILES_ONLY); fileChoose.setControlButtonsAreShown(false); fileChoose.addPropertyChangeListener(this);
Here I have disabled the default buttons. I am using my customized one. When I select the file in the FileChooser I am able to retrieve the filename by using the below method as expected.
But, the typed filename in the "File Name" textfield of the FileChooser is not getting reflected in the fileChoose.getSelectedFile() method.It is always providing the previously selected filename not the typed one in the text field. Please share your thoughts.