1. Change your application so that it can open multiple images at the same time (but only one image is displayed at any time). Then add a pop-up menu (using class JComboBox) to select the image to display.
2. Implement an undo function in your image viewer. This function reverses the last operation