@SuppressWarnings("unchecked")
	public void updateTableValues(ArrayList<?> list) {
		DefaultTableModel tableModel = (DefaultTableModel) table.getModel();
		// Remove rows from previous query.
		tableModel.setRowCount(0);

		if (((List<?>) list.get(1)).get(1) instanceof Double) {
			setMedianValue((List<Double>) list.get(1));
		}

		for (int i = 0; i < ((List<?>) list.get(0)).size(); i++) {
			Object[] o = new Object[list.size()];
			for (int j = 0; j < list.size(); j++) {
				o[j] = ((List<?>) list.get(j)).get(i);
			}
			tableModel.addRow(o);
		}

		// Set column 0's width to the preferred size

		for (int col = 0; col < table.getColumnCount(); col++) {
			int width = 0;
			for (int row = 0; row < table.getRowCount(); row++) {
				TableCellRenderer renderer = table.getCellRenderer(row, col);
				Component comp = table.prepareRenderer(renderer, row, col);
				width = Math.max(comp.getPreferredSize().width, width);
			}
			table.getColumnModel().getColumn(col)
					.setPreferredWidth(width + columnPadding);
		}
	}