problem of using GridBagConstraints
gbc = new GridBagConstraints();
item = new ArrayList();
item.add("aaaa");
item.add("aaa");
item.add("aa");
for(int i=0;i<item.size();i++){
labeli] = new JLabel();
labe.setText(item.get(i).toString());
gbc.gridx = 0;
panel.add(label,gbc);
}
checkOpt = new JTextField();
checkBoxOpt = new JCheckBox();
checkBoxOpt.setText("a");
panel.add(checkBoxOpt,gbc);
gbc.ipadx = 200;
gbc.gridx = gbc.RELATIVE;
gbc.gridy = gbc.REMAINDER+4;
panel.add(checkOpt,gbc);
output i got:
aaaa
aaa
aa
a|__|><--this is textfield
the answer is what i should do to make this textfiled closer to label "a" so it can look like this;
aaaa
aaa
aa
a|__|<--this is textfield
thanks :)

