private int getChoosenTableIndex ( ) { String tableName = cTables . getSelectedItem ( ) ; // System.out.println("in getChoosenTableIndex, selected Item is "+tableName); int index = getTableIndex ( tableName ) ; if ( index >= 0 ) { // System.out.println("table found, index: " + index); return index ; } // end of if (index >= 0) ZaurusTableForm tableForm = new ZaurusTableForm ( tableName , cConn ) ; pForm . add ( tableName , tableForm ) ; vHoldTableNames . addElement ( tableName ) ; vHoldForms . addElement ( tableForm ) ; // System.out.println("new tableform for table "+tableName+", index: " + index); return vHoldTableNames . size ( ) - 1 ; }
if the table name is not in vHoldTableNames create a ZaurusTableForm for it