Replace Thread with invokeLater in PreferencesFrame

GUI components can only be updated safely from the main event thread. `invokeLater` could also be called from the new thread, but the performance difference is negligible.