public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		String JSONtext = "";
		switch (command) {
		case "chatmessage": // JTextField
			try {

				JSONtext = enc.encode(new Message(tg.chat.field.getText(),
						tg.chat.userName));
				tg.chat.field.setText("");
				sendMessage(JSONtext);
			} catch (JSONException e1) {
				e1.printStackTrace();
			}
			break;
		case "startButton":
			if(startable){
				try {
					JSONtext = enc.encode(new StartedMessage());
					sendMessage(JSONtext);
				} catch (JSONException e1) {
					e1.printStackTrace();
				}
				
				
			}
		break;
		case "kick":
			
				try {
					JSONtext = enc.encode(new KickMessage());
					sendMessage(JSONtext);
				} catch (JSONException e1) {
					e1.printStackTrace();
				}
				
				
			
		break;
		default:
	
		}
		
	}