Center the window.

based on: http://www.codebeach.com/2008/02/center-dialog-box-frame-or-window-in.html