void addAccessKey(int accessKey,Component cmp,boolean override){
  if ((override) && (accessKeys.contains(cmp))) {
    Hashtable newAccessKeys=new Hashtable();
    for (Enumeration e=accessKeys.keys(); e.hasMoreElements(); ) {
      Object key=e.nextElement();
      Component c=(Component)accessKeys.get(key);
      if (c != cmp) {
        newAccessKeys.put(key,c);
      }
    }
    accessKeys=newAccessKeys;
  }
  accessKeys.put(new Integer(accessKey),cmp);
  Form form=getComponentForm();
  if (form != null) {
    form.addKeyListener(accessKey,this);
  }
}

void addAccessKey ( int accessKey , Component cmp , boolean override ) { if ( ( override ) && ( accessKeys . contains ( cmp ) ) ) { Hashtable newAccessKeys = new Hashtable ( ) ; for ( Enumeration e = accessKeys . keys ( ) ; e . hasMoreElements ( ) ; ) { Object key = e . nextElement ( ) ; Component c = ( Component ) accessKeys . get ( key ) ; if ( c != cmp ) { newAccessKeys . put ( key , c ) ; } } accessKeys = newAccessKeys ; } accessKeys . put ( new Integer ( accessKey ) , cmp ) ; Form form = getComponentForm ( ) ; if ( form != null ) { form . addKeyListener ( accessKey , this ) ; } }
adds the given access key to make it focus on the given component
