Karl Parry wrote:
> Hi,
> I have an object that specifies a table, I want to be
> able to create an array of these objects (the uses
> says how many). Then these objects are placed in the
> scene.
>
> I have the following snippit of code:
>
> Table[] table = new Table[tableNo];
>
> for(i = 0; i > tableNo; i++)
> {
> tmpVector2.set((-2.0f + i), 0.0f, 0.0f);
> objRoot.addChild(table[i].Furniture(tmpVector2));
First, you should use i< tableNo, as Raj already mentioned. Then you get
null pointer exception which is correct behavior - table[i] is null for
every i, so table[i].Furniture is throwing NPE.
You probably need to do something like
table[i] = new Table();
at start of loop.
Artur
===========================================================================
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".