How does the event dispatch thread work?
If I understand your question correctly you’re wonder why you can’t do this: public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { showGUI(); } }); counter.start(); } The reason why you can’t do it is because the scheduler makes no guarantees… just because you invoked showGUI() and then you invoked counter.start() … Read more