Be careful here, I recommend that you create the window in setup and then hide/show the window as and when required using setVisible(true/false). Do NOT destroy a window with close() if you plan to recreate it later - you can read more about this on my website.
2 Likes