private int buildMatchHistory(int match, JPanel panel, int maxRounds) {
		Vector columns = cdata.getColumnData(match);
		int numRounds = cdata.getNumRounds(match);
		int firstRound = 0;

		// for (int i=firstRound; i<numRounds; i++) {
		for (int i = numRounds - 1; i >= 0; i--) {
			Color backColor;
			// if ((i % 2 == 0 && maxRounds % 2 == 0) || (i % 2 == 1 &&
			// maxRounds % 2 == 1))
			if (match % 2 == 0)
				backColor = new Color(220, 220, 220);
			else
				backColor = new Color(204, 204, 204);

			JPanel mNumPanel = new JPanel();

			JLabel mNum = new JLabel("" + (match + 1));
			mNum.setForeground(Color.black);
			mNum.setHorizontalAlignment(SwingConstants.CENTER);

			mNumPanel.setBackground(backColor);
			mNumPanel.add(mNum);

			if (columns == null || columns.size() < 1)
				gridbag.setConstraints(mNumPanel, endRowConstraints);
			else
				gridbag.setConstraints(mNumPanel, normalConstraints);

			panel.add(mNumPanel);

			if (columns != null && columns.size() > 0) {
				for (int k = 0; k < columns.size(); k++) {
					Hashtable column = (Hashtable) columns.get(k);
					Color foreColor = (Color) column.get("color");

					JPanel columnPanel = new JPanel();

					JLabel columnLabel = new JLabel();
					String data = (String) column.get(new Integer(i));
					if (data == null)
						data = "";
					columnLabel.setText(data);
					columnLabel.setForeground(foreColor);
					columnLabel.setHorizontalAlignment(SwingConstants.CENTER);

					columnPanel.add(columnLabel);
					columnPanel.setBackground(backColor);

					if (k == (columns.size() - 1))
						gridbag.setConstraints(columnPanel, endRowConstraints);
					else
						gridbag.setConstraints(columnPanel, normalConstraints);

					panel.add(columnPanel);
				}
			}
		}
		return numRounds;
	}