Learing GridBagLayout, The issue here is, the name label and combox don\'t show up on the top of the panel, but I have set its anchor to NORTH. Why ?
import
You have to change
gridBagConstraints.weighty = 0.0;
to
gridBagConstraints.weighty = 1.0;
otherwise the area reserved for the component is slimmed to the size of the component, and it doesn't matter in which direction you "anchor" the component.
The result after changing the weighty
is the following: