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