// We don't want to write it to the socket // now; that could cause the applet to pause. // Instead, we add it to the queue of strings to // be sent by the output thread, and send // a notification that the output queue has // been changed. synchronized (outputStrings) { outputStrings.addElement(s); outputStrings.notify(); }