PApplet app = comp.getPApplet();
AppletInfo info = applets.get(app);
if(info != null && info.paControls.remove(comp)){
info.paControls.add(comp);
if(comp.parent == null && app != null && info.autoDrawOn){
app.unregisterDraw(comp);
app.registerDraw(comp);
}
}
}