Window.setVisible(boolean) will make the window hide or show but not close.
Type: Posts; User: jps
Window.setVisible(boolean) will make the window hide or show but not close.
I am happy you figured it out and got it working.
Please post the final solution for future readers and mark the thread as solved if all is well
Please do not create another thread with the same question. This is your third try.
You can refer to the answer given in post #19. If you do not understand it, ask a question.
Use an action command to help filter. If you are using 7 or later you can switch on the String
Glad you got it working the way you want.
See post number 19 in this thread for the answer to this question...
It sounds to me like you have a problem filtering your events.
--- Update ---
...
The System class does not have a dispose() method. Consult the API for the methods of the class.
If you are using a different class named System, that is a poorly chosen name for a class, and it...
If you want advice, answer the questions you were asked.
If you want help, post what you have tried and explain why it is not satisfactory to you.
The simple solution would be to provide a straight forward answer to a question when one is asked. For example:
You have been asked several times, when the button is clicked and the jframe is to...
Please post the necessary files on the forum rather than through a link or attachment.
What have you tried since post #11. Up to that point you were doing a good job solving your problem. Post...
Work on one problem at a time. Or did you finish working on closing the jframe how you wanted to?
...How did you open the first JFrame? ... Do it again.
Or there is the option to hide (rather...
....and leave the program running?
....and close the program?
....reopen the jframe later or not?
What have you tried since post #11?
Use code tags when posting code. Instructions can be found on the announcements page. For future readers please edit your post and wrap the code in tags.
@Override
public void...
Step 1 complete. Step 2 has been started but not finished. You have added "this" as an action listener to the button correctly, but I do not see the code that closes the JFrame you wish to close....
copeg give you a perfect set of steps to follow in post #4.
Post any questions you have about which step you are stuck on.
Include the full text of any error messages with your code so we can see...