private Connection createConnection(String destination, ArrayList<Process> processes) {
		Connection connection = null;

		// Search the process
		Process requiredProcess = null;
		for (Process process : processes) {
			if (process.getName().equals(destination)) {
				requiredProcess = process;
				break;
			}
		}
		if (requiredProcess == null) {
			return null;
		}

		// Create connection
		try {
			Socket socket = new Socket(requiredProcess.getIpAddress(), requiredProcess.getPort());
			connection = new Connection(socket, textArea);
			connectionPool.put(requiredProcess.getName(), connection);
			textArea.append("Connect success!\n"); // for test

			// Create a new thread for this connection
			Runnable receiveMessageJob = new ReceiveMessageJob(connection, receiveBuffer, textArea, connectionPool,
					clockService);
			Thread receiveMessageThread = new Thread(receiveMessageJob);
			receiveMessageThread.start();
		} catch (UnknownHostException e) {
			textArea.append("Unknown host when connecting!\n");
		} catch (IOException e) {
			textArea.append("IOException when connecting!\n");
		}

		return connection;
	}