vendredi 5 août 2016

how to use timer with SwingWorker

need an example, how to use timer in SwingWorker ? because it impossible to add an ActionListener to my Timer like that !

private Timer timer = new Timer(100, new ActionListener() {

    @Override
    public void actionPerformed(ActionEvent ae) {

    }
});

Message Error : The constructor Timer(int, new ActionListener(){}) is undefined

Aucun commentaire:

Enregistrer un commentaire