void populateTable() {

		// if there are any data, remove them from the table first
		while (tableModel.getRowCount() > 0) {
			tableModel.removeRow(0);
		}
		tableModel.setColumnCount(0);

		int numberOfRows = pointer / 2;
		Object t[] = new Object[numberOfRows];
		for (int i = 0; i < numberOfRows; i++) {
			t[i] = i + "";
		}
		tableModel.addColumn("#", t);
		for (int i = 0; i < numberOfRows; i++) {
			t[i] = format.format(data[i + i]);
		}
		tableModel.addColumn(tableColumnNames == null ? (getPrincipalVariable() == null ? "x" : getPrincipalVariable())
				: tableColumnNames[0], t);
		for (int i = 0; i < numberOfRows; i++) {
			t[i] = format.format(-data[i + i + 1]);
		}
		tableModel.addColumn(tableColumnNames != null && tableColumnNames.length > 1 ? tableColumnNames[1]
				: (getExpression() == null ? "y" : getExpression()), t);

	}