Hi Philippe,
here's an example:
Action.getNamedActions().put("exit", new Action() {
@Override
public void perform(Component source) {
try {
FactoryConexao.shutdown(); // shutdown hsqldb database
DesktopApplicationContext.exit(); // exit application
} catch (Exception e) {
e.printStackTrace();
}
}
});
Cheers,
Luiz Gustavo
2011/6/17 <[email protected]>
> I would like to provide an Exit button in a Pivot application running
> standalone.
>
> Is it a better way to do this than
> 1. calling explicitely Application.shutdown() to release resources
> 2. System.exit(0) ?
>
> I mean sending an event that can be properly handled eg confirm exit?
>
> Thx
> Philippe Bajoit
> ULg/SeGI
>
--
Luiz Gustavo S. de Souza
http://luizgustavoss.wordpress.com