Use NSWindow's setWindowFrameAutosaveName: method to cause the main window's rectangle to be automatically saved and restored.