jframe-dispose-method

JFrame dispose method

JFrame.dispose() is used to  destroy JFrame window and clean it up from the operating system.Read also more about System.exit(0)

Output

jframe-dispose-method