5 * $Id: AddressScreen.java,v 1.1 2008/04/30 14:28:49 rmh3093 Exp rmh3093 $
8 * $Log: AddressScreen.java,v $
9 * Revision 1.1 2008/04/30 14:28:49 rmh3093
17 public class AddressScreen
{
19 public AddressScreen() {
20 String
[] elements
= {"Name","Address","City","State","Zip"};
21 String
[] buttons
= {"Add","Modify","Delete"};
22 JFrame mainFrame
= new JFrame("Address Information");
23 Container mainPane
= mainFrame
.getContentPane();
24 mainPane
.setLayout(new BorderLayout());
25 mainFrame
.setDefaultCloseOperation(JFrame
.EXIT_ON_CLOSE
);
26 mainFrame
.setVisible(true);
27 Container top
= new Container();
28 top
.setLayout(new GridLayout(5,2));
29 for (String s
: elements
) {
30 top
.add(new JLabel(s
));
31 top
.add(new JTextField());
33 mainPane
.add(top
, BorderLayout
.CENTER
);
34 Container bottom
= new Container();
35 bottom
.setLayout(new FlowLayout(FlowLayout
.CENTER
));
36 for (String s
: buttons
) { bottom
.add(new JButton(s
)); }
37 mainPane
.add(bottom
, BorderLayout
.SOUTH
);
44 public static void main(String args
[]) {