I have facing some problem when I try to create an image from a canvas..
I have two class-- one of the is super class which extends JApplet and other is sub class which extends Canvas class.
This sub class and a button are added to the super class using border layout within init().
So sub class contains only two methods paint(Graphics g) and update(Graphics g). From paint() and and update() I have called just one method of super class updateCanvas().
Now updateCanvas() again called another method dragAndDrawCircle(), by which we can draw circle using mouse drag.
Now I want to create an image exactly same as whatever things are drawn on the canvas by click on the button.
But I don't know how can I do it?
So help me please.