JButton ActionListener – GUI updates only after JButton is clicked

Do not perform any intensive operations within EDT, otherwise the GUI will be unresponsive and you might not see the GUI updates. Best choice you can use is SwingWorker:

For more on this, please read Concurrency in Swing.

Leave a Comment