Remembering the last directory visited

How can I change my program so that in the open dialog it remembers the last directory I visited. In addition, how can I also list recent file opened in the file menu.TIA.
[199 byte] By [tnr009] at [2007-9-26 1:19:36]
# 1
use the Properties class. It can be easily written to a file with store/load
esmo at 2007-6-29 0:52:19 > top of Java-index,Archived Forums,Java Programming...
# 2
Are you saying I can use properties class for last directory visited?
tnr009 at 2007-6-29 0:52:19 > top of Java-index,Archived Forums,Java Programming...
# 3
oi, i think i misunderstood? Setting the directory of a filedialog/chooser shouldn;t be too hard; either setDirectory or setCurrentDirectory depending on the object you use...but I'm not sure what you are asking now...
esmo at 2007-6-29 0:52:19 > top of Java-index,Archived Forums,Java Programming...