i want to calling form2 from form1 using command new form2().show, this.setVisible(false).
I want to ask how to close form1 without using setvisible(). because setVisible only hide it but did not close the program
i want to calling form2 from form1 using command new form2().show, this.setVisible(false). I want
Share
– You can use
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)method to close the form1 when you make the form2 visible.