AS/400 Toolbox for Java \ HTML classes \ HTML forms \ Layout form panel \ LineLayoutFormPanel

LineLayoutFormPanel class

Start changeThe LineLayoutFormPanel class represents a line layout of form elements for an HTML form. The form elements are arranged in a single row within a panel.

This example creates a LineLayoutFormPanel object and adds two form elements.

  
  CheckboxFormInput privacyCheckbox = new CheckboxFormInput("confidential", "yes", "Confidential", true);
  CheckboxFormInput mailCheckbox = new CheckboxFormInput("mailingList", "yes", "Join our mailing list", false);
  LineLayoutFormPanel panel = new LineLayoutFormPanel();
  panel.addElement(privacyCheckbox);
  panel.addElement(mailCheckbox);
  String tag = panel.getTag();
  

The code example above generates the following HTML code:

<input type="checkbox" name="confidential" value="yes" checked="checked" /> Confidential <input type="checkbox" name="mailingList" value="yes" /> Join our mailing list <br />

When you use this HTML code in a webpage, it looks like this:

Confidential Join our mailing list
End change
[ Information Center Home Page | Feedback ] [ Legal | AS/400 Glossary ]