In this chapter, we looked at the undo package and saw how, with very little effort, you can make it possible for the user to undo and redo edits within text fields. We then moved on to describe the fundamental classes and interfaces within the undo package and saw how to apply the undo mechanism in a nontext context by developing an UndoableEdit for use in conjunction with a JTree. Finally, we saw how to improve the undo packages UndoManager class to make it easier to create the kind of undo support that users get in popular desktop applications.