What text do you want written to the text file? The PrintWriter class could be used to do the writing.