Ashish

I think you might get benefit from a debugger and stepping through your
code. Anyway, the null is in your cg array. Some of the elements in it are
null. I think the reason has to do with the fact that you are creating two
behaviors -- each one has its own cg and even creates a new cg every
processStimulus. So each time you are "adding" a point to the cg array, you
are in fact putting it into a freshly created array. I also suspect that
there are array indexing errors in your code. If you don't have a good
development environment, I suggest forte which is free from sun. It's what I
use. Regarding the fact that your behavior is not triggered until the second
mouse click, I don't have an answer. You definitely should fix the the more
basic errors first.

Raffi

-----Original Message-----
From: Ashish Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 12:27 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Plz somebody help!



Hello Everybody!

please help me and try to pay attention what I have
written:

I want to draw line between two primitives (one
cylinder and one box)with mouse. I have stored center
of bounds of two primitives using setUserData().I am
also able to retrieve data using getUserData(). But
one problem is coming which has anoyed me too much and
i am fighting for last one week. When you run the
program, and click on any primitive in the window for
the very first time nothing happens but when you click
it again, it pick that object and show messages in the
console window.But it will show same two outputs,
doesn't matter whether you have changed the position
of mouse or not.

After this you get two same outputs for one mouse
click. Since the coordinates that you get with mouse
click will be same, you can't draw a line and it is
throwing null pointer exception.

Please give some of your time to code and run the
application. You will be able to understand what i
have written above.

Please help me, I really need to complete this
application.

Thanks very much for help.

=====
Graduate Research Assistant
Virtual/Augmented and Rapid Prototyping Lab
University of Missouri-Rolla
Rolla, MO 65401
573-341-6815 (O)/573-308-1380 (R)
FAX: 573-341-6815

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

===========================================================================
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".

Reply via email to