@Override
        public void windowClosing(WindowEvent e) {
          onWindowClosing.run();
          window.removeWindowListener(this);
        }
@Override
        public void windowClosing(WindowEvent e)