203.129.225.221 writes:
I want to know that how does the component object create an instance of the graphics class though its an abstract class. By the rule or concept one can not create an instance of an abstract class. So i want to know the method by which the component class creates the instance internally.
Anand Gore
194.158.187.242 writes:
The following method should do the trick:
public Graphics createNewGraphics {
Image newImage;
Graphics newGraphics;
newImage = this.createImage(this.size().width, this.size().height);
newGraphics = newImage.getGraphics();
return newGraphics;
}
Please note that only drawings to the original graphics will have effect on screen.
Henk Jan, HJNoot@sum-it.nl