public void newwidget(int id, String type, Coord c, int parent, Object... args)
     throws InterruptedException {
   WidgetFactory f;
   if (type.indexOf('/') >= 0) {
     int ver = -1, p;
     if ((p = type.indexOf(':')) > 0) {
       ver = Integer.parseInt(type.substring(p + 1));
       type = type.substring(0, p);
     }
     Resource res = Resource.load(type, ver);
     res.loadwaitint();
     f = res.layer(Resource.CodeEntry.class).get(WidgetFactory.class);
   } else {
     f = Widget.gettype(type);
   }
   synchronized (this) {
     Widget pwdg = widgets.get(parent);
     if (pwdg == null)
       throw (new UIException("Null parent widget " + parent + " for " + id, type, args));
     Widget wdg = f.create(c, pwdg, args);
     bind(wdg, id);
     wdg.binded();
     if (wdg instanceof MapView) mainview = (MapView) wdg;
   }
 }