- catch (@SuppressWarnings("unused") NoSuchMethodException e)
- {
- Constructor<?> constructor = c.getConstructor(ViewModelModifiable.class, int.class);
- comp = constructor.newInstance(parent.submodelModifiable, logicWidth);
- }
-
- if (comp instanceof GUIComponent)
- return (GUIComponent) comp;
- throw new IllegalArgumentException("Class given as subcomponent was not a GUIComponent!");