JFileChooser set focus to specific directory
843806May 7 2008 — edited May 8 2008Is it possible to set the JFileChooser to grab focus on the previous selected directory in directory only mode from the textfield containing the selected file name?
The behavior I am seeking is to show the chooser with a directory already selected and or highlighted. I have tried the set selected file method and that does not highlight the file as if the user selected the file. I keep getting various behaviors where I set the selected folder. In the file name text component it shows upper level directories at times instead of the directory I specified. The focus is typically located on the file name text component and I would rather have the focus on the directory entry specified in the file name text. Is that possible with JFileChooser?