@Override
		public void run() {
			Envelope e = null;
			try {
				/*
				 * Loop to check for incoming messages.
				 */
				while((e=(Envelope)in.readObject()) != null)
				{
					//Special server message that adds to the user list.
					if(e.sender().equals("Server") && e.message().equals("Join."))
					{
						usersModel.removeAllElements();
						for(String s : e.recipiants())
							usersModel.addElement(s);
					}
					//Special server message that removes from the user list.
					if(e.message().equals("Leave."))
					{
						System.out.println(e.sender() + "left.");
						usersModel.removeElement(e.sender());
					}
					//Print out the message.
					chat.setText(chat.getText() + e.sender() + ": "+ e.message() +"\n");
				}
			} catch (IOException ex) {
				ex.printStackTrace();
			} catch (ClassNotFoundException ex) {
				ex.printStackTrace();
			}
		}