private void displayResult(ArrayList<String[]> answerList)
	{
		int totalWellDone = 0;
		int totalQuestion = 0;

		String[] legend = { "Question", "Expected answer", "Your answer", "" };

		String[][] result = new String[20][4];

		int x = 0;

		for (; x < answerList.size(); x++)
		{
			totalQuestion++;

			if (answerList.get(x)[3].equals(TYPICALCOMMENT[0]))
				totalWellDone++;

			for (int y = 0; y < answerList.get(x).length; y++)
				result[x][y] = answerList.get(x)[y];
		}

		int percentage = totalWellDone * 100 / totalQuestion;
		String[] mainMark = new String[2];
		mainMark[0] = "Your score is " + totalWellDone + " / " + totalQuestion;

		if (percentage >= 80)
			mainMark[1] = "Excellent!";
		else if (percentage >= 50)
			mainMark[1] = "Good!";
		else mainMark[1] = "Try again.";

		x++;
		for (int y = 0; y < mainMark.length; y++)
			result[x][y] = mainMark[y];

		JTable resultTable = new JTable(result, legend);
		resultTable.setShowGrid(false);
		resultTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);

		JScrollPane scrollPane = new JScrollPane(resultTable);
		scrollPane.setPreferredSize(new java.awt.Dimension(600, 200));
		JOptionPane.showMessageDialog(null, scrollPane, "Your results",
				JOptionPane.INFORMATION_MESSAGE, null);
	}