@Override public void run() { // set up UI elements here so that swing functions are thread-safe // Remember, the model has not necessarily been initialized yet. Model.updateAll() notifies all // observers // which in turn completes initial GUI setup _mainWindow = new MainWindow(_model); // View is allowed one method call to notify observers. After that, it's up to the model. try { _model.ready(); } catch (UpdateException e) { System.err.println( "Error: View has exceeded notification permissions. Model must be responsible for updates."); e.printStackTrace(); } }