@Override
          public void windowClosing(WindowEvent e) {
            // This grab focus ensures that the diff description is saved.
            final WorkspaceTabPanelFunctions workspaceController =
                controller.getTabPanelManager().getWorkspaceTabPanel().getController();
            workspaceController.getWorkspaceTree().grabFocus();

            // Do not remove invokeLater, otherwise BinDiff exits before grabFocus() has been
            // executed.
            SwingUtilities.invokeLater(controller::exitBinDiff);
          }
This class represents the BinDiff main window.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/window/MainWindow.java