JFileChooser filename field validation...
843804Nov 11 2004 — edited Nov 14 2004All,
I am embedding a JFileChooser object into my own JPanel. I'm setting the chooser to select directories only. The problem is that when I call chooser.getSelectedFile() and the user has typed something into the filename field, I only get the file that is selected in the list instead of the file entered by hand. Is there anyway to find out when the user changes the text in the file name field? Or, is there a way to force the selection in the list to update itself from the entered file name field? I know that if the user presses ENTER while in the file name field, this happens. Could I fake that somehow?
Thanks!