static class Task_StringUpdate extends SwingWorker { JLabel jlabel; public Task_StringUpdate(JLabel jlabel) { this.jlabel = jlabel; } @Override protected void process(List chunks) { jlabel.setText(chunks.get(chunks.size()-1)); // The last value in this array is all we care about. System.out.println(chunks.get(chunks.size()-1)); } @Override protected Void doInBackground() throws Exception { publish("Loading Step 1..."); Thread.sleep(1000); publish("Loading Step 2..."); Thread.sleep(1000); publish("Loading Step 3..."); Thread.sleep(1000); publish("Loading Step 4..."); Thread.sleep(1000); return null; } @Override protected void done() { try { get(); JOptionPane.showMessageDialog(jlabel.getParent(), "Success", "Success", JOptionPane.INFORMATION_MESSAGE); } catch (ExecutionException | InterruptedException e) { e.printStackTrace(); } } }