public void addChild(Actor parent, Actor child) { child.remove(); try { ReflectionCache.getType(parent.getClass()) .getMethod("setWidget", Actor.class) .invoke(parent, child); return; } catch (Exception ignored) { // FIXME this is bad Gdx.app.log("TableToolkit", "Couldn't call setWidget", ignored); } ((Group) parent).addActor(child); }