Use SwingUtilities.invokeLater