Hi,

I have a menu item for exiting the application, and I use this action for
that:

Action.getNamedActions().put("exit", new Action() {
      @Override
      public void perform(Component source) {
        for (int i = display.getLength() - 1; i >= 0; i--) {
          Window window = (Window) display.get(i);
          window.close();
        }
        System.exit(0);
      }
    });

Is it a good way of doing that or is there another better one, in which I
don't have to call System.exit(0)?

Reply via email to