Hi all,

I am working on the sample from java.sun.com/docs/books/tutorial/uiswing/examples/components/GenealogyExampleProject/src/components/GenealogyModel.java

Here's my while loop ,
Java Code:
try {
            String sql="Select * from folder";
            list.add("Current Folders");
            while(rs.next()) {
                String folderName = rs.getString("folder_name");
               // System.out.println(folderName);
                //Person a1 = new Person(folderName);
Then I want to put it into this way
Java Code:
 Object hierarchy[]=list.toArray();
            for(int i=1; i<hierarchy.length; i++) {
               Person a+i=new Person(hierarchy[i]);
I do not know how I can assign the "Person a1, a2 depending on var i.
However, if I hardcoded it as below, it works fine.
Java Code:
Person a1 = new Person("Jack (great-granddaddy)");
Person a2 = new Person("Jean (great-granny)");
Can someone help me here?
Thank you