public EditorPane(RegularExpression expression) {
		// super(new BorderLayout());
		this.expression = expression;
		field.setText(expression.asString());
		field.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				updateExpression();
			}
		});
		field.getDocument().addDocumentListener(new DocumentListener() {
			public void insertUpdate(DocumentEvent e) {
				updateExpression();
			}

			public void removeUpdate(DocumentEvent e) {
				updateExpression();
			}

			public void changedUpdate(DocumentEvent e) {
				updateExpression();
			}
		});
		setLayout(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints();
		c.fill = GridBagConstraints.BOTH;
		c.weightx = 1.0;
		c.gridwidth = GridBagConstraints.REMAINDER;

		add(new JLabel("Edit the regular expression below:"), c);
		add(field, c);
	}