[SOLVED] Swing Timer issue
Hi, is there any alternative to using Thread.sleep() to wait a certain amount of seconds within a swing timer? The program is not responsive at times using Thread.sleep(). I have heard its a bad idea with a GUI. I have posted code below.
Help is greatly appreciated.
javax.swing.Timer timer = new javax.swing.Timer(1000, new MyTimerActionListener());
catch (InterruptedException e)
public class MyTimerActionListener implements ActionListener
public void actionPerformed(ActionEvent e)