All pastes #735164 Raw Edit

Etwas

public java v1 · immutable
·published 2007-10-13 11:47 UTC
rendered paste body
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                                 startCountdown();    }                                                    public void startCountdown() {        SwingUtilities.invokeLater(new Runnable() {  //Note 1            public void run() {                                for ( int i = 0; i < 2000; i++ ) {                    System.out.println( i );                    try {                        wait(100);                    } catch (InterruptedException e) {                        throw new RuntimeException(e);                    }                                    }                                            }        });            }