If you are using a callback method, you need to test that the
transformgroup you operate on in the callback method is not null.
static class MyCallbackClass extends Object implements PickingCallback
{
public void transformChanged(int type, TransformGroup tg)
{
// Must test to see if a TransformGroup is not null
before calling
// any methods.
// Otherwise get a nullpointer exception in Method
if (tg != null)
{
If you don't get the error when you click on an object in scene, then this
would be a likely suspect.
At 10:02 PM 02/07/2000 -0500, you wrote:
>I would greatly appreciate it if someone could help me out. I am trying to
>use picking to get the transform group of one of the objects in my scene.
>Right now when I click anywhere inside the application I get this error:
>
>Exception occurred during Behavior execution:
>java.lang.NullPointerException
> at javax.media.j3d.BehaviorRetained.wakeupOn(BehaviorRetained.java: 283)
> at javax.media.j3d.Behavior.wakeupOn(Behavior.java: 217)
> at
>com.sun.j3d.utils.behaviors.picking.PickMouseBehavior.processStimulus(PickMo
>useBehavior.java: 124)
> at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java: 168)
> at javax.media.j3d.J3dThread.run(J3dTread.java: 256)
>
>if you could give me any idea what I might be doing wrong or a better way to
>do this (along with some sample code hopefully) I would be very happy.
>Thanks for the help
>
>Eric
>
>===========================================================================
>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".
***********************************************************************
Eric Reiss - http://www.sigda.acm.org/Eric/
Email: [EMAIL PROTECTED]
SIGDA Internet Server Manager - http://www.sigda.acm.org/
Assistant Systems Manager - School of Engineering
University of Pittsburgh
***********************************************************************
===========================================================================
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".