File tree Expand file tree Collapse file tree
src/main/com/marginallyclever/makelangelo Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88// io functions
99
10- import java .awt .BorderLayout ;
11- import java .awt .Container ;
12- import java .awt .Dimension ;
13- import java .awt .GraphicsEnvironment ;
14- import java .awt .Point ;
15- import java .awt .Toolkit ;
10+ import java .awt .*;
1611import java .awt .datatransfer .DataFlavor ;
1712import java .awt .datatransfer .Transferable ;
1813import java .awt .dnd .DnDConstants ;
@@ -421,7 +416,10 @@ private JMenu createFileMenu() {
421416 menu .addSeparator ();
422417
423418 JMenuItem buttonExit = new JMenuItem (Translator .get ("MenuQuit" ));
424- buttonExit .addActionListener ((e ) -> onClosing ());
419+ buttonExit .addActionListener ((e ) -> {
420+ WindowEvent windowClosing = new WindowEvent (mainFrame , WindowEvent .WINDOW_CLOSING );
421+ Toolkit .getDefaultToolkit ().getSystemEventQueue ().postEvent (windowClosing );
422+ });
425423 menu .add (buttonExit );
426424
427425 return menu ;
You can’t perform that action at this time.
0 commit comments