Non-sequential row and column numbering

It is not necessary to give the FormLayout sequential row and column numbers, or to start the numbering at 0 or 1. In this example, the two columns are numbered -100 and 100, and the rows are numbered -20, -10, 0, 10, 20. Use this feature for code generators or runtime component adjustments.

Panel Construction Code

m_formPanel = new FormPanel(8, 5, 8, 8);
m_formPanel.setDefaultFillRightPct(.3);
// FormPanel extends JPanel,
// has FormLayout as the default layout manager,
// and exposes all the methods of FormLayout


m_formPanel.add(new JLabel("Invoice Item ID"), new JTextField(8), -20, -100);

JComboBox productCB = new JComboBox();
productCB.addItem("Lawn Mower");
m_formPanel.add(new JLabel("Product"), productCB, -10, -100);

m_formPanel.add(new JLabel("Quantity"), new JTextField(3), 0, -100);

JComboBox deliveryCB = new JComboBox();
deliveryCB.addItem("10 Day Ground");
m_formPanel.add(new JLabel("Delivery Method"), deliveryCB, 10, -100);

m_formPanel.add(new JLabel("First Name"), new JTextField(14), 20, 100);
m_formPanel.add(new JLabel("MI"), new JTextField(2), -20, 2);
m_formPanel.add(new JLabel("Last Name"), new JTextField(21), -10, 100);

m_formPanel.add(new JLabel("Street"), new JTextField(30), 0, 100);

m_formPanel.add(new JLabel("City"), new JTextField(15), 10, 100);
m_formPanel.add(new JLabel("State"), new JTextField(2), 10, 100);
m_formPanel.add(new JLabel("Zip"), new JTextField(5), 10, 100, 1);