How to close jqwidget window with button

I can make a jqwidget window appear (window.show() ) - however, it does not show a button that can be used to close it. How would I do this?

This might help: jQuery Window

Or just add your own button to call window.hide().

Have you tried Window1.hide()?