panel.add(component,
new GridBagConstraints(0, i, 2, 1, 1, weighty, GridBagConstraints.NORTHWEST, getFill(component),
new Insets(verticalInset, leftInset, verticalInset, 5), 0, 0));
}
else {
Pair pair = (Pair)option;
JComponent firstComponent = (JComponent)pair.first;
int verticalInset = firstComponent instanceof JLabel || firstComponent instanceof JTextField ? 2 : 0;
panel.add(firstComponent,
new GridBagConstraints(0, i, 1, 1, 1, weighty, GridBagConstraints.WEST, getFill(firstComponent),
new Insets(verticalInset, leftInset, verticalInset, 5), 0, 0));