public GrammarViewer(Grammar grammar) {
		setModel(new GrammarTableModel());
		this.grammar = grammar;
		// setLayout(new BorderLayout());
		Production[] prods = grammar.getProductions();
		data = new Object[prods.length][2];
		Object[] columnNames = { "Production", "Created" };

		for (int i = 0; i < prods.length; i++) {
			data[i][0] = prods[i];
			data[i][1] = Boolean.FALSE;
			productionToRow.put(prods[i], new Integer(i));
		}
		DefaultTableModel model = (DefaultTableModel) getModel();
		model.setDataVector(data, columnNames);

		// Set the listener to the selectedness.
		getSelectionModel().addListSelectionListener(listSelectListener);
	}