41 |
|
* @param attribute the data attribute we look after |
42 |
|
*/ |
43 |
|
public StringDataComponent(String name, String attribute) { |
44 |
– |
super(); |
45 |
– |
this(name, attribute, DEFAULT_TEXT_LENGTH); |
46 |
– |
} |
47 |
– |
|
48 |
– |
/** |
49 |
– |
* Creates the component with a friendly name to be |
50 |
– |
* used as label |
51 |
– |
* |
52 |
– |
* @param name the friendly name |
53 |
– |
* @param attribute the data attribute we look after |
54 |
– |
* @param displayLength the length of the JTextField |
55 |
– |
*/ |
56 |
– |
public StringDataComponent(String name, String attribute, int displayLength) { |
44 |
|
_name = name; |
45 |
|
_attribute = attribute; |
46 |
< |
_displayLength = displayLength; |
60 |
< |
_item = new JTextField("", _displayLength); |
46 |
> |
_item = new JTextField("", DEFAULT_TEXT_LENGTH); |
47 |
|
_item.setEditable(false); |
48 |
|
_label = new JLabel(_name + ": "); |
49 |
|
_label.setHorizontalAlignment(JLabel.RIGHT); |