Hi all, Does anyone know how to obtain the path of the last accessed path for the JFileChooser. For example, if the default path for JFileChooser chooser = new JFileChooser() is "My Documents" and the user open the chooser dialog and save the file named saveFile in C:\\ directory. The next time the chooser dialog open, the path should default to C:\\.
One way is to store this path in a String variable like strLastPath, and store this variable in a properties file or sth. Then you can read this variable and open JFileChooser in the approprtiate folder/directory using JFileChooser(String )'s constructor which takes path. HTH, - Manish
I brought this back from the farm where they grow the tiny ads: