public void actionPerformed(ActionEvent e) 
			{
				String message = "";
				if(chboxPriv.isSelected())
				{
					int tries = 0;
					while(tries<3)
					{
						String usernameTo = connectionList.getSelectedItem();
						if(!usernameTo.equals(null))
						{
							message = "MSG PRIVATE "+txtName.getText()+" "+usernameTo+" "+txtChat.getText();
							addMessage("Private message to "+usernameTo+": "+txtChat.getText());
							break;
						}
						else
							tries++;
					}
				}
				else
					message = "MSG PUBLIC "+txtName.getText()+" "+txtChat.getText();
				sendPacket(message);
				txtChat.setText("");
			}