thanks.but one question what if I want the file name to be an input from the user. For instance the user was manapulating data, that by code is structured in a JTree, and wants to save their work. Therefore will save the changes to a file. I want to know how to save these changes to a jtree to a file. A file they will name. I hope I make sense. All help is great. thank you