Java close a jframe programmatically

Java close a jframe programmatically

Sending a WINDOW_CLOSING event to close jframe

ref‮e‬r to:lautturi.com
JFrame frame = new JFrame("Java Swing - lautturi");
...
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
Created Time:2017-10-06 11:51:17  Author:lautturi