I am making a GUI in Java and I was wondering how you could make a GUI Window that is already opened reappear to the front of the desktop.
For example, if I press a button the first time, it would open a new window. Every time afterwards that I try to click the button, it just makes the already existing window reappear to the front instead of making a brand new window appear. If I were to close the window and click the button again, it would proceed to create another new window.