private void addButton(RedButton btn) { add(btn); btn.setRect(0, pos > 0 ? pos += GAP : 0, WIDTH, BTN_HEIGHT); pos += BTN_HEIGHT; }