How can I create a widget in a new window?

As I said I was making a java ide I made the code editor tabbed one but I want to edit the code in a new dedicated window so I want to create a new widget in a new widget.
How can I do it