How can I use this arrray?

I have written arguemnts to add severals shapes to the scene(by using createVrmlFromString()), all the shape nodes stored in shapeArray[], now I'd like to use another array(b[]) to get the index of each shape nodes which has been added to the secne, so that I can record the their sequence.
1. Can I use the arguments as following:
shapeArray = {shape1,shape2,shape3.....}
if(clickedButton = shape1)
{ b.add(shapeArray.indexof(0)); b++ }
if (clickedButton = shape2)
{ b.add(shapeArray.indexof(1)); b++}
2. Since the length of b[] is dynamically changed according to the number that the nodes added to the scene, shoudl I use the vector, how can I get the index of the shapeArray to a vector. should I use
Vector b = new Vector;
b.addElement(shapeArray.indexof(0));
b++; //?

I haven't used createVrmlFromString(), but maybe this will help...
Note at Square, Circle, and Rectangle extends Shape.
Shape[] shapeArray = { new Square(0, 0, 10, 10),
                                 new Circle(10, 10, 10),
                                 new Rectangle(20, 20, 150, 100)
Vector clickedShapes = new Vector();
// in the combobox listener
clickedShapes.add(shapeArray(cb.getSelectedIndex()));
// in the 'submit button' actionlistener; get first item
Shape s = (Shape)v.get(0);
[/code[

Similar Messages

Maybe you are looking for

  • Problems in the installation of Trial Version 71 CE SR3

    Hi, I am trying to install the trial version of NW 71 CE SR3. I donwloaded it from SDN. The target system is a Windows XP Prof SP2 with 2 Gb of RAM. The error I get is in the system requirements check. A swap file of 4096 Mb  is required and I do not

  • Vendor Search for del or inactive vendors

    Hi, We have many vendors of the same name but with diff locations and some are deleted. But when we are creating a PO for a particular vendor and when we enter the part name it will show all the vendor even deleted vendor also. But is there a way to

  • Finding the correct date to print on the report....

    Hi SAP, I've hit a road block and I need someone's help please. I have a main report that displays employee hrs worked, work dates based on invoice number. I also have a subreport that looks at a specific table that prints the entire employee's rate

  • LOAD VILLA MODEL WITH TEXTURES

    HI FOR ALL FIRST I HAVE A PROBLEM IN MY GRADUATION PROJECT I WANT TO LOAD A 3D VILLA MODELS WITH TEXTURES I LOADED MODELS BUT TEXTURES DID NOT APPEAR PLEASE CAN ANY ONE HELP ME SECOND I WANT TO PUT THE JAVA 3D APPLET ON A WEBSITE HOW CAN I PUT THE J3

  • AutoSync: playlist changes not automatically copying to iPod?

    Hi, I have my iPod 5G 30GB Video setup to autosync with my iTunes on Windows. Everything is up to latest version. The copying of songs and album art works great, but I notice that I am making changes to the ordering of songs in my playlists and those