Login dialog window won't dispose completely
问题 I've got a dialog window for logging in a user to a main program in Java. I've recently discovered, however, that if the user clicks the "Cancel" button or the window's native Close button, the program still runs, even if the login window itself has been disposed of. I have to force quit it. My instincts tell me that it has to do with the LoginService that is created as part of creating a JXLoginPane . Please have a look at my (well-documented) code below and give me your thoughts: package