public static String getName(EventObject e){
     Object o=e.getSource();
     //XAux.pl("source "+o);
     if(o instanceof JComponent){
        Object v=((JComponent) o).getClientProperty("name");
        if(v!=null)return (String)v;
     } else
     if(o instanceof Document){
        Object v=((Document) o).getProperty("name");
        if(v!=null)return (String)v;
     } else
     if(o instanceof Component){
        Object v=((Component) o).getName();
        if(v!=null)return (String)v;
     }  else
     if(names.containsKey(o)){return names.get(o);}
     //System.out.println("cannot find source "+o);
     String s=o.toString();
     if(s.length()<20&&s.indexOf("[")<0)return s;
     return "";
   }