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);
Create a method and call it to close the JFrame, for example:
public void CloseJframe(){ super.dispose(); }