如果你希望GUI像单击X关闭按钮那样运行,则需要向调度一个窗口关闭事件
Window。在
ExitAction从关闭应用程序,你可以将此功能添加到一个菜单项或使用任何组件
Action小号容易。
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));

如果你希望GUI像单击X关闭按钮那样运行,则需要向调度一个窗口关闭事件
Window。在
ExitAction从关闭应用程序,你可以将此功能添加到一个菜单项或使用任何组件
Action小号容易。
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));