Added the window closing ability, when the user pressed the cross of the JFrame they will be prompted to save the document if they have not do so already.