01: import java.awt.*;
02: import javax.swing.*;
03: 
04: public class FormLayoutTester
05: {
06:    public static void main(String[] args)
07:    {
08:       JFrame frame = new JFrame();
09:       frame.setLayout(new FormLayout());
10:       frame.add(new JLabel("Name"));
11:       frame.add(new JTextField(15));
12:       frame.add(new JLabel("Address"));
13:       frame.add(new JTextField(20));
14:       frame.add(new JLabel("City"));
15:       frame.add(new JTextField(10));
16:       frame.add(new JLabel("State"));
17:       frame.add(new JTextField(2));
18:       frame.add(new JLabel("ZIP"));
19:       frame.add(new JTextField(5));
20:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
21:       frame.pack();
22:       frame.setVisible(true);
23:    }
24: }
25: 
26: 
27: