OneLineComponent (int index) { for (int i = getComponentCount(); i <= index; i++) { add(new OneLineComponent(), new GridBagConstraints(0, i, 1, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBInsets.emptyInsets(), 0, 0)); } return (OneLineComponent)getComponent(index); }