Replace the Jframe by a window