private void setupUndoRedo() {
		// Listen for undo and redo events
		doc.addUndoableEditListener(new UndoableEditListener() {
		    public void undoableEditHappened(UndoableEditEvent evt) {
		        undo.addEdit(evt.getEdit());
		    }
		});

		// Create an undo action and add it to the text component
		lyricBox.getActionMap().put("Undo",
		    new AbstractAction("Undo") {
		        /**
				 * 
				 */
				private static final long serialVersionUID = 1565063027867235847L;

				public void actionPerformed(ActionEvent evt) {
		            try {
		                if (undo.canUndo()) {
		                    undo.undo();
		                }
		            } catch (CannotUndoException e) {
		            }
		        }
		   });

		// Bind the undo action to ctl-Z
		lyricBox.getInputMap().put(KeyStroke.getKeyStroke("control Z"), "Undo");

		// Create a redo action and add it to the text component
		lyricBox.getActionMap().put("Redo",
		    new AbstractAction("Redo") {
		        /**
				 * 
				 */
				private static final long serialVersionUID = -4202651192510434020L;

				public void actionPerformed(ActionEvent evt) {
		            try {
		                if (undo.canRedo()) {
		                    undo.redo();
		                }
		            } catch (CannotRedoException e) {
		            }
		        }
		    });

		// Bind the redo action to ctl-Y
		lyricBox.getInputMap().put(KeyStroke.getKeyStroke("control Y"), "Redo");
	}