O
oliv
hi,
I have to use a function that returns a java.awt.BufferedImage :
BufferedImage image=function.method(..);
I want now to clone the "image" instance (different instance but same
information).
// of course it does not work because clone method is not public
BufferedImage clone=(BufferedImage)image.clone();
What is the fatest way to do that ?
I tried this:
public class MyBufferedImage extends BufferedImage implements
Cloneable {
/* I don't know how to do the constructor ?? */
MyBufferedImage() {
super(null,null,true,null);
}
public Object clone() throws CloneNotSupportedException
{
return super.clone();
}
}
and I don't know what to do next with this class
thanks
I have to use a function that returns a java.awt.BufferedImage :
BufferedImage image=function.method(..);
I want now to clone the "image" instance (different instance but same
information).
// of course it does not work because clone method is not public
BufferedImage clone=(BufferedImage)image.clone();
What is the fatest way to do that ?
I tried this:
public class MyBufferedImage extends BufferedImage implements
Cloneable {
/* I don't know how to do the constructor ?? */
MyBufferedImage() {
super(null,null,true,null);
}
public Object clone() throws CloneNotSupportedException
{
return super.clone();
}
}
and I don't know what to do next with this class
thanks