We have verified the bug you described in Text3D.setString.  This will
not be fixed in our 1.1.2 release, which should be on the web this
week.  Until a fix is available, the workaround that you provided
should do the trick.  Btw, the workaround has a bug in that it never
detaches the branch group containing the old text.  You may want to add
the following to the beginning of your addText method:

        if (txtBG != null) {
            txtBG.detach();
        }

Hope this helps.

-- 
Kevin Rushforth
Java 3D Team
Sun Microsystems

[EMAIL PROTECTED]

>Date: Thu, 03 Jun 1999 14:20:40 -0700
>From: "Decker, Scott D" <[EMAIL PROTECTED]>
>Subject: RE: Re : [java3d] re:change display in text2d
>To: "'David MASTALERZ'" <[EMAIL PROTECTED]>,
>        "'Java3D'" <[EMAIL PROTECTED]>
>
>Here is the changed class
>I put in a branchgroup that you can detach and then add in a new text object
>just a hack I am afraid
>
><note to sun team>
>It would seem that the setString method in the Text3D object does not do what
>you would expect
>It would seem that when you do the setString() it does not remove the geometry
>of the previous text
>nor does it try to use the Font object that is stored inside of it, nor the
>character spacing.
>What you would expect is that setString removes the previous geometry and
>creates a new geometry with the new text
>
>possible bug?
>Scott
> <<Text3DTest.java>>  <<Text3DTestold.java>> 
>
>Scott Decker
>Research Scientist
>Pacific Northwest National Labs
>[EMAIL PROTECTED]
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to