Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java 3D > Let Canvas3D dr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 733 of 818
Post > Topic >>

Let Canvas3D draw in another Graphics object

by "bene51" <bene.schmid@[EMAIL PROTECTED] > Jan 31, 2007 at 09:33 AM

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




 1 Posts in Topic:
Let Canvas3D draw in another Graphics object
"bene51" <be  2007-01-31 09:33:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 23:22:26 CDT 2008.