Hi Kelvin:
Your suggestion fixed the disappearing canvas problem, thanks!
Cheers,
Mona
> This is not correct since
> GraphicsConfigTemplate3D
> is not used at all when constuct the GraphicsConfiguration.
> Please either use (1) or (2) as I mention.
>
> Thanks.
>
> - Kelvin
>
>
> >Date: Mon, 04 Mar 2002 14:50:50 -0800 (PST)
> >From: Mona Wong <[EMAIL PROTECTED]>
> >Subject: Re: [JAVA3D] canvas disappears on window machine
> >To: [EMAIL PROTECTED]
> >
> >Hi Kelvin:
> >
> > Looks like I am doing a combination of the 2; here is my code to setup
> >the canvas:
> >
> > private Canvas3D createCanvas() {
> >
> > GraphicsEnvironment graphicsEnv =
> > GraphicsEnvironment.getLocalGraphicsEnvironment();
> > GraphicsDevice graphicsDev = graphicsEnv.getDefaultScreenDevice();
> > GraphicsConfiguration graphicsConfig =
> > graphicsDev.getDefaultConfiguration();
> >
> > canvas = new Canvas3D ( graphicsConfig );
> >
> > universe = new SimpleUniverse ( canvas );
> >
> > return ( canvas );
> >
> > } // private Canvas3D createCanvas()
> >
> > Is this wrong? Should I use your 2nd method?
> >
> >Mona
> >
> >
> >> Hi,
> >>
> >> Are you using
> >>
> >> (1)
> >> GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
> >>
> >> // set template properties here
> >>
> >> GraphicsConfiguration gc =
> >GraphicsEnvironment.getLocalGraphicsEnvironment().
> >> getDefaultScreenDevice().getBestConfiguration(template);
> >>
> >> new Canvas3D(gc)
> >>
> >>
> >> to initialize Canvas3D
> >>
> >>
> >> OR
> >>
> >> (2)
> >>
> >> the one in SimpleUniverse
> >> GraphicsConfiguration gc =
> >> SimpleUniverse.getPreferredConfiguration();
> >>
> >> new Canvas3D(gc)
> >>
> >>
> >> If not, the GraphicsConfiguration is not compatibable with
> >> Java3D.
> >>
> >> - Kelvin
==================================================================
Mona Wong-Barnum
National Center for Microscopy and Imaging Research
University of California, San Diego
http://ncmir.ucsd.edu/
"The truth shall set you free, but first it will piss you off"
A Landmark instructor
==================================================================
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".