SwitchDataEnumeration(Hashtable<Integer,Label> tab){
  table=new Integer[tab.size()];
  int i=0;
  for (Enumeration<Integer> e=tab.keys(); e.hasMoreElements(); ) {
    table[i++]=e.nextElement();
  }
  Arrays.sort(table);
  current_index=0;
}

SwitchDataEnumeration ( Hashtable < Integer , Label > tab ) { table = new Integer [ tab . size ( ) ] ; int i = 0 ; for ( Enumeration < Integer > e = tab . keys ( ) ; e . hasMoreElements ( ) ; ) { table [ i ++ ] = e . nextElement ( ) ; } Arrays . sort ( table ) ; current_index = 0 ; }
create a new enumeration from the hashtable . each key in the hash table will be an integer , with the value being a label . the enumeration returns the keys in sorted order .
