public static void calculateValues(int row, int id, int temperature)
	{
		// Set values received in the 2D array
		valueArray[row - 1][id - 1] = temperature;

		// Grab all values & calculate the average temp
		for(int i = 0; i < antalVeckor; i++)
		{
			// Variable to hold this weeks temp. sum
			int collectTemp = 0;

			// Init an array to collect the 
			// values from one row in valueArray
			int[] collectArrayWeek = new int[7];

			for(int i2 = 0; i2 < collectArrayWeek.length; i2++)
			{
				// Collect weeks sum temp. in one variable
				collectTemp += valueArray[i][i2];

				// Copy one row over from valueArray
				collectArrayWeek[i2] += valueArray[i][i2];

				// Collects all week data into a period array
				collectListPeriod[i * 7 + i2] = 0;
				collectListPeriod[i * 7 + i2] += collectArrayWeek[i2];
				System.out.println(collectListPeriod[i * 7 + i2]);
			}

			// Divide the sum of the temps.
			double averageTemp = (double) collectTemp/7;

			// Set the 0, 3, 6th widgets text in the fields list
			// Format the numbers so that we dont get a lot of decimals
			fields.get(i * 3).setText(numberFormat.format(averageTemp) + " C");

			// Sort the collectArray into ascending order
			Arrays.sort(collectArrayWeek);

			// Set the 1, 4, 7th widgets text - week
			fields.get((i * 3) + 2).setText(numberFormat.format(collectArrayWeek[0]) + " C");

			// Set the 2, 5, 8th widgets text - week
			fields.get((i * 3) + 1).setText(numberFormat.format(collectArrayWeek[6]) + " C");	

			// Print things out for debugging, could use Log.X also ...
			System.out.println("\nHighest temp. : " + collectArrayWeek[6]
					+ "\nLowest temp. :" + collectArrayWeek[0]);
			System.out.println(temperature + " C");
			System.out.println("Row: " + row + " Id: " + id);
			System.out.println("Average : " + averageTemp);	
			System.out.println("CollectListPeriod lenght: " + collectListPeriod.length);
		}

		// Sort the period array (denna metod fungerar för Bengt)
		Arrays.sort(collectListPeriod);

		// Hold the sum of temps over the period
		double sumPeriod = 0;

		// Collect sum for the period in sumPeriod
		for(int i6 = 0; i6 < antalVeckor * 7; i6++)
		{
			sumPeriod += collectListPeriod[i6];
		}

		// Divide the period sum by number of days
		double averagePeriod = sumPeriod/(antalVeckor * 7);

		// Set the third last widgets text (average temp)
		fields.get(antalVeckor * 3).setText(numberFormat.format(averagePeriod) + " C");

		// Set the second last widgets text (highest temp)
		fields.get((antalVeckor * 3) + 1).setText(numberFormat.format(collectListPeriod[collectListPeriod.length - 1]) + " C");

		// Set the last widgets text (lowest temp)
		fields.get((antalVeckor * 3) + 2).setText(numberFormat.format(collectListPeriod[0]) + " C");
	}