package addBk.address;
import java.awt.*;
import java.awt.event.TextEvent;
import java.awt.event.TextListener;
public class AddressPanel extends Panel
implements TextListener,
AddressSettable {
TextArea t0 =
new TextArea(
"1313 Mocking Bird Lane\n new Line");
TextArea t1 =
new TextArea("Notes on John");
public void textValueChanged(
TextEvent e) {
System.out.println(
e);
}
public void setAddress(AddressRecord a) {
t0.setText(a.getAddress1());
t1.setText(a.getAddress2());
repaint();
}
AddressPanel() {
setLayout(
new GridLayout(0, 1));
add(t0);
add(t1);
t0.addTextListener(this);
t1.addTextListener(this);
}
}