Hi, I have an application that has the feature to change the users with the click of a button.
For the first attempt it works fine; it closes the JFrame and opens the login JFrame. However if the users clicks on the button to change user for the secound time, the main JFrame stays open and the login JFrame reopens as it should. Now what I want is to always close the main JFrame when the user clicks the mentioned button.
To close the main frame I am using the following code:
And in the action performed I am using the following code:
Can anyone please let me know of a better way to avoid this issue.