How to close a GUI when i push a JButton

后端 未结 7 872
无人共我
无人共我 2020-12-10 11:58

Does anyone know how to make a jbutton close a gui? I think it is like System.CLOSE(0); but that didnt work. it also could be exitActionPerformed(evt);

7条回答
  •  抹茶落季
    2020-12-10 12:36

    You may use Window#dispose() method to release all of the native screen resources, subcomponents, and all of its owned children.

    The System.exit(0) will terminates the currently running Java Virtual Machine.

提交回复
热议问题