I'm using 1.2 Beta 2, and here's the code (I just modified the HelloUniverse
example):

 <<HelloUniverse.java>>
Daniel Dvorak




> -----Original Message-----
> From: Jean Wen Sheu [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 11, 2000 12:19 PM
> To:   [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Subject:      Re: [JAVA3D] J3DGraphics2D runtime error
>
> Daniel,
>       What version of J3D are you using ? Is it 1.2 FCS or 1.2 Beta2 ?
>       Could you also send me the reproducible code and we will take a
>       look ?
>       Jean
> -------------
> Java 3D Team
> Sun Microsystems Inc.
>
> >MIME-Version:
> >Date: Thu, 11 May 2000 08:04:01 -0400
> >From: "Dvorak, Daniel J." <[EMAIL PROTECTED]>
> >Subject: [JAVA3D] J3DGraphics2D runtime error
> >To: [EMAIL PROTECTED]
> >
> >I'm trying to use J3DGraphics2D to draw some text.  To start with, I
> added
> >this line:
> >
> >J3DGraphics2D tablet = canvas.getGraphics2D();
> >
> >When I try to run, I get this error:
> >
> >java.lang.IllegalArgumentException: Width (0) and height (0) must be > 0
> >        at java.awt.image.SampleModel.<init>(SampleModel.java:100)
> >        at
> >java.awt.image.SinglePixelPackedSampleModel.<init>(SinglePixelPackedSampl
> eMo
> >del.java:109)
> >        at java.awt.image.Raster.createPackedRaster(Raster.java:598)
> >        at java.awt.image.Raster.createPackedRaster(Raster.java:412)
> >        at
> >java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColo
> rMo
> >del.java:637)
> >        at java.awt.image.BufferedImage.<init>(BufferedImage.java:254)
> >        at
> >javax.media.j3d.J3DGraphics2DImpl.<init>(J3DGraphics2DImpl.java:48)
> >        at javax.media.j3d.Canvas3D.getGraphics2D(Canvas3D.java:1124)
> >        at Test3D.createSceneGraph(Test3D.java, Compiled Code)
> >
> >
> >Any idea what could be wrong?
> >
> >Daniel Dvorak
> >
> >=========================================================================
> ==
> >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".
>
> ******************************************
> *    Graphics Systems Software           *
> *    Sun Microsystems,Inc.               *
> *    1601 Willow Rd.  UMPK27-301         *
> *    Menlo Park,CA 94025                 *
> *                                        *
> *    Email:[EMAIL PROTECTED]             *
> *    Phone:(650)786-6255                 *
> *    Fax:  (650)786-7359                 *
> ******************************************

HelloUniverse.java

Reply via email to