Salut,
Je souhaiterais faire une attente bloquante, notamment dans ce cas:
Comment coder les méthodes en gras (spécifiquement pour ce cas là)?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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(); }
En gros c'est pour ensuite faire:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 showSplashScreenBloquant(); actionsApresLeSplashOuSiLeChargementDuSplashAPlante();
Partager