How to close a GUI when i push a JButton

后端 未结 7 866
无人共我
无人共我 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:54

    Create a method and call it to close the JFrame, for example:

    public void CloseJframe(){
        super.dispose();
    }
    
    0 讨论(0)
提交回复
热议问题