   [java] GridBagLayout oddness?
  Right... I have the textfields in the example below set to fill the gridspace that they''re in... but they don''t. Oddly, they seem to be size in reverse proportion to the labels. Any ideas?Cheers,Stupublic JPanel createJPanel(){JPanel form = new JPanel();form.setLayout((new BorderLayout()));JPanel content = new JPanel();content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));Enumeration keys = m_fields.keys();Enumeration values = m_fields.elements();GridBagConstraints gbc = new GridBagConstraints();gbc.insets = new Insets(5,5,5,5);int gridy = 0;while(keys.hasMoreElements()){JPanel edit = new JPanel();edit.setLayout(new GridBagLayout());JLabel label = new JLabel(keys.nextElement().toString()+":");gbc.gridx = 0;gbc.gridy = gridy;gbc.fill = GridBagConstraints.NONE;gbc.anchor = GridBagConstraints.WEST;gbc.weightx = 0.4D;edit.add(label, gbc);JComponent editor = getComponent(values.nextElement().toString());gbc.gridx = 1;gbc.gridy = gridy;gbc.fill = GridBagConstraints.HORIZONTAL;gbc.anchor = GridBagConstraints.CENTER;gbc.weightx = 0.6D;edit.add(editor, gbc);gridy++;content.add(edit);}JPanel controls = getControls();form.add(content, "Center");form.add(controls, "South");return form;} 