Is it possible to click on a button and JFrame
to be closed as if I had clicked on the X of the window? If it is possible, how do I create it?
What I've already studied is using ActionListener
but I can not find the code to close the window.