private ActionListener initEditListener()
	{
		// the actionlistener for the Edit menu
		ActionListener editListener = new ActionListener()
		{
			public void actionPerformed(ActionEvent event)
			{
				String clicked = event.getActionCommand();

				if (clicked.equalsIgnoreCase("Undo"))
				{
					if (m_undoManager.canUndo())
						m_undoManager.undo();
				} else if (clicked.equalsIgnoreCase("Redo"))
				{
					if (m_undoManager.canRedo())
						m_undoManager.redo();
				} else if (clicked.equalsIgnoreCase("Copy"))
				{
					Clipboard cb =
						Toolkit
							.getDefaultToolkit()
							.getSystemClipboard();
					String s = m_text.getSelectedText();
					StringSelection contents = new StringSelection(s);
					cb.setContents(contents, null);
				} else if (clicked.equalsIgnoreCase("Cut"))
				{
					Clipboard cb =
						Toolkit
							.getDefaultToolkit()
							.getSystemClipboard();
					String s = m_text.getSelectedText();
					StringSelection contents = new StringSelection(s);
					cb.setContents(contents, null);
					m_mainframe.removeText(
						m_text.getSelectionStart(),
						(m_text.getSelectionEnd()
							- m_text.getSelectionStart()));
				} else if (clicked.equalsIgnoreCase("Paste"))
				{
					Clipboard cb =
						Toolkit
							.getDefaultToolkit()
							.getSystemClipboard();
					Transferable content = cb.getContents(this);
					try
					{
						String s =
							(String) content.getTransferData(
								DataFlavor.stringFlavor);
						m_mainframe.insertText(
							m_text.getCaretPosition(),
							s);
					} catch (Throwable e)
					{
						System.err.println(e);
					}
				} else if (clicked.equalsIgnoreCase("Find..."))
				{
					// TODO: implement Edit->Find...
				}
			}
		};
		return editListener;
	}