pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luiz Gustavo <luizgustav...@gmail.com>
Subject Exiting the application
Date Sat, 18 Dec 2010 02:36:14 GMT
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)?

Mime
View raw message