@@ -0,0 +1,468 @@
+package org.egordorichev.lasttry.ui;%0A%0Apublic class UiManager %7B%0A%09private Map%3CString, UiComponent%3E componets;%0A%0A%09public UiManager() %7B%0A%09%09this.componets = new HashMap%3CString, UiComponent%3E();%0A%09%7D%0A%09%0A%09public %3CT extends UiComponent%3E T add(String id, Rectangle rect, Object ... args) %7B%0A%09%09T component = new T(rect, args);%0A%09%09this.components.get(id) = component;%0A%09%09return component;%0A%09%7D%0A%09%0A%09public %3CT extends UiComponent%3E T get(String id) %7B%0A%09%09return (T) this.components.get(id);%0A%09%7D%0A%7D%0A

Create UiManager.java