/** * Le thread de sauvegarde régulier */ class SaveThread extends Thread { private AgendaImpl a; public SaveThread(AgendaImpl a) { this.a = a; } public void run() { while ( true ) { try { Thread.sleep(20000); } catch(Exception e) {} a.sauverEtat("etat.agd"); } } }