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);
System.CLOSE(0);
exitActionPerformed(evt);
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.
System.exit(0)