protected Layout(JPanel panel) { this.panel = panel; elements = new List <UIElement>(); setUpperLeftCorner(0, 0); setWidth(panel.getWidth()); setHeight(panel.getHeight()); }