Attente bloquante : comment faire?
Salut,
Je souhaiterais faire une attente bloquante, notamment dans ce cas:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| private void showXXX() {
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
MyJFrame frame = new MyJFrame();
frame.addWindowListener(new WindowAdapter() {
@Override public void windowClosed(WindowEvent e) {
arreteLAttenteBloquante();
}
}
}
}
} catch(InvocationTargetException ite) {} catch(InterruptedException ie) {}
attenteBloquante();
} |
Comment coder les méthodes en gras (spécifiquement pour ce cas là)?
En gros c'est pour ensuite faire:
Code:
1 2
| showSplashScreenBloquant();
actionsApresLeSplashOuSiLeChargementDuSplashAPlante(); |