Well if you have noticed, you have posted some WindowAdapter code which tries to delete the files.
If you need help, you need to help us help you by posting
SSCCE code which we can try out and identify the problem.
PS. Please do take out time to read what SSCCE really means before posting code.