I have a couple of classes, one is my mainGUI which has a JMenu in it, if a certain JMenuItem is select it will create a new GUI (this other GUI is another window thats totally different). The new GUI opens up as i want but i can continue to create a new instances of this GUI.

So the basic question is... How do i ensure my program only allows one instance of this GUI?