private void makeConnection(ArrayList<String> connection)
	{
		// Check the type of gate and call the appropriate function
		if (connection.get(0).equals("INVERTER"))
			createInverter(connection.get(1), connection.get(2));
		else if (connection.get(0).equals("AND"))
			createAnd(connection.get(1), connection.get(2), connection.get(3));
		else if (connection.get(0).equals("OR"))
			createOr(connection.get(1), connection.get(2), connection.get(3));
		else if (connection.get(0).equals("JK"))
			createJK(connection.get(1), connection.get(2), connection.get(3));
		else if (connection.get(0).equals("SR"))
			createSR(connection.get(1), connection.get(2), connection.get(3));
		else if (connection.get(0).equals("T"))
			createT(connection.get(1), connection.get(2));
		else if (connection.get(0).equals("D"))
			createD(connection.get(1), connection.get(2));
	}