public void addStringField(String label, String defaultText, int columns) { Label theLabel = makeLabel(label); c.gridx = 0; c.gridy = y; c.anchor = GridBagConstraints.EAST; c.gridwidth = 1; if (stringField==null) { stringField = new Vector(4); c.insets = new Insets(5, 0, 5, 0); } else c.insets = new Insets(0, 0, 5, 0); grid.setConstraints(theLabel, c); getContentPane().add(theLabel);  TextField tf = new TextField(defaultText, columns); tf.addActionListener(this); tf.addTextListener(this); tf.addFocusListener(this); tf.addKeyListener(this); c.gridx = 1; c.gridy = y; c.anchor = GridBagConstraints.WEST; grid.setConstraints(tf, c); tf.setEditable(true); getContentPane().add(tf); stringField.addElement(tf); y++; }
public void addStringField(String label, String defaultText) { addStringField(label, defaultText, 8); }
	public void addStringField(String label, String defaultText, int columns) {		Label theLabel = makeLabel(label);		c.gridx = 0; c.gridy = y;		c.anchor = GridBagConstraints.EAST;		c.gridwidth = 1;		if (stringField==null) {			stringField = new Vector(4);			c.insets = new Insets(5, 0, 5, 0);		} else			c.insets = new Insets(0, 0, 5, 0);		grid.setConstraints(theLabel, c);		getContentPane().add(theLabel);		TextField tf = new TextField(defaultText, columns);		tf.addActionListener(this);		tf.addTextListener(this);		tf.addFocusListener(this);		tf.addKeyListener(this);		c.gridx = 1; c.gridy = y;		c.anchor = GridBagConstraints.WEST;		grid.setConstraints(tf, c);		tf.setEditable(true);		getContentPane().add(tf);		stringField.addElement(tf);		y++;    }