You need an undoable action. In particular you could look into the
UndoableEdit interface in javax.swing.undo and that package in
particular.
> Dear Friends,
>
[quoted text clipped - 41 lines]
>
> Your earlier reply would be a great help to me.
Yes, it's possible, and very easy, assuming you have a reasonable design
for your undo system. In a typical design, for every undo-able action (or
what you call an "event"), you would create an object representing the
action that was performed, and store it in a linked list.
To undo an action, you would simply look at the tail of the list to see
what the last action was, and then do its inverse (e.g. if it was the
pasting of a certain text, you would "unpaste", or delete the text).
The implementation for your "Clear event" button would simply be to
clear the linked list.
- Oliver