Hello all,
I have the following problem: I want to use a library which contains a
class that extends already java.awt.Canvas. I want to use this class
as a canvas, since it provides many useful features. However, Java3D
requires a Canvas3D object. My plan was, to subclass Canvas3D and
override paint, so that it doesn't use its own Graphics object, but
that of the other Canvas class. Something like this:
class NewCanvas extends OtherCanvas {
private MyCanvas3D canvas3d;
private Graphics graphics;
private class MyCanvas3D extends Canvas3D {
public void paint(Graphics g) {
super.paint(graphics);
}
}
...
}
I know, that this is not nice, and it doesn't work either. So maybe
some of you can tell me how something like this can be done in a
proper way.
Thanks a lot


|