I'm currently working on a java game which opens up with a "start screen" frame. In the startscreen, I have a button called buttonLogin. Once you press buttonLogin, a login dialog launched by a LoginDialog class will pop up asking you for a username and password. In the dialog there are two buttons, login and cancel. Once you press login, my game will open, but the start screen is still visible.
My problem is that I do not know how to write code in the actionPerformed method of my LoginDialog class to close the existing StartScreen window.
Keep in mind that I am writing in the LoginDialog class and not the StartScreen class.