How to make a JFrame button open another JFrame class in JAVA in which button should also close the Jframe from which button has been clicked
Answers
Answered by
3
You need to use frame.dispose( ) to close the current frame.
this.dispose( ) is also used to close the current frame too.
new NewForm( ).setVisible(true);
this.dispose( );
this.dispose( ) is also used to close the current frame too.
new NewForm( ).setVisible(true);
this.dispose( );
Similar questions