1 | private void addField(JPanel panel, JLabeledTextField field, GridBagConstraints gbc) {↵ | | 1 | private void addField(JPanel panel, JLabeledTextField field, GridBagConstraints gbc) {↵
|
2 | List item = field.getComponentList();↵ | | 2 | List item = field.getComponentList();↵
|
3 | panel.add((Component) item.get(0), gbc.clone());↵ | | 3 | panel.add((Component) item.get(0), gbc.clone());↵
|
4 | gbc.gridx++;↵ | | 4 | gbc.gridx++;↵
|
5 | gbc.weightx = 1;↵ | | 5 | gbc.weightx = 1;↵
|
6 | gbc.fill=GridBagConstraints.HORIZONTAL;↵ | | 6 | gbc.fill=GridBagConstraints.HORIZONTAL;↵
|
7 | panel.add((Component) item.get(1), gbc.clone());↵ | | 7 | panel.add((Component) item.get(1), gbc.clone());↵
|
8 | }↵ | | 8 | }↵
|
|
9 | // Next line↵ | | |
|
10 | private void resetContraints(GridBagConstraints gbc) {↵ | | 9 | private void resetContraints(GridBagConstraints gbc) {↵
|
11 | gbc.gridx = 0;↵ | | 10 | gbc.gridx = 0;↵
|
12 | gbc.gridy++;↵ | | 11 | gbc.gridy++;↵
|
13 | gbc.weightx = 0;↵ | | 12 | gbc.weightx = 0;↵
|
14 | gbc.fill=GridBagConstraints.NONE;↵ | | 13 | gbc.fill=GridBagConstraints.NONE;↵
|
15 | }↵ | | 14 | }↵
|
|
16 | private void initConstraints(GridBagConstraints gbc) {↵ | | 15 | private void initConstraints(GridBagConstraints gbc) {↵
|
17 | gbc.anchor = GridBagConstraints.NORTHWEST;↵ | | 16 | gbc.anchor = GridBagConstraints.NORTHWEST;↵
|
18 | gbc.fill = GridBagConstraints.NONE;↵ | | 17 | gbc.fill = GridBagConstraints.NONE;↵
|
19 | gbc.gridheight = 1;↵ | | 18 | gbc.gridheight = 1;↵
|
20 | gbc.gridwidth = 1;↵ | | 19 | gbc.gridwidth = 1;↵
|
21 | gbc.gridx = 0;↵ | | 20 | gbc.gridx = 0;↵
|
22 | gbc.gridy = 0;↵ | | 21 | gbc.gridy = 0;↵
|
23 | gbc.weightx = 0;↵ | | 22 | gbc.weightx = 0;↵
|
24 | gbc.weighty = 0;
| | 23 | gbc.weighty = 0;
|