4546474849505152535455
u.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { if (undo.canUndo()) { undo.undo(); overlay.repaint(); } updateButtons(); } } );
5859606162636465666768
r.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent event) { if (undo.canRedo()) { undo.redo(); overlay.repaint(); } updateButtons(); } } );