Use InvokeLater to update GUI from the appropriate thread.