public Production[] getItemSet(Set items, String message) {
		restricted = items;
		choiceTable.setModel(new ImmutableGrammarTableModel());
		alreadyChosen = new HashSet();
		while (true) {
			int choice = JOptionPane.showConfirmDialog(parent, panel, message,
					JOptionPane.OK_CANCEL_OPTION);
			if (choice == JOptionPane.CANCEL_OPTION)
				return null;
			// Get those selected.
			List selected = new ArrayList();
			GrammarTableModel model = choiceTable.getGrammarModel();
			for (int i = 0; i < model.getRowCount() - 1; i++)
				selected.add(model.getProduction(i));
			// Check if it's our target.
			if (items != null) {
				Set selectedSet = new HashSet(selected);
				if (!selectedSet.equals(items)) {
					JOptionPane.showMessageDialog(parent,
							"Some items are missing!", "Items Missing",
							JOptionPane.ERROR_MESSAGE);
					continue;
				}
			}
			return (Production[]) selected.toArray(new Production[0]);
		}
	}