I have designed a simple 2D animation program on java using canvas class. In my program I have make use of
Java Code:
Graphics g
Java Code:
Image myImage = createImage(width, height)

Now I want to save previous state of the canvas. By which I can see the previous state of the application at any time.
How can I fulfill this requirement?

Thank you.