users@woodstock.java.net

Grid Layout

From: Quintin Beukes <quintin_at_last.za.net>
Date: Sun, 17 Aug 2008 21:21:51 +0200

Hey,

I basically want to create a layout that consists of 1 row and 2 columns.
Inside each cell there should be a "sub layout".
The first should contain 2 rows of label/formfield pairs, which will be
about 200px high.
The second cell will contains 3 rows of label/formfield pairs, but they will
be less high, about 100px.

So when I create a grid panel with 2 columns, and as children 2 more grid
panels with 2 columns, again inside which I add the respective components.

Everything is fine, but the fields of the 2nd cell are all middle vertical
aligned to those of the second cell. How can I make everything top aligned?
These layouts are really difficult :/

Either way, I want something similar as to what can be achieved with this
(html). Just put it inside a file and load into your browser to get an idea
of what I want. Note that absolute positioning isn't an option, as I want
the fields to the right to move left/right as the fields in the left get
wider/narrower.

<html>
<body>
<table>
<tr>
  <td valign="top">
  <table>
  <tr>
    <td>Name1:</td>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td valign="top">List1:</td>
    <td><select size="10" multiple="t"><option>10 rows of
select</option></select></td>
  </tr>
  </table>
  </td>

  <td valign="top">
  <table>
  <tr>
    <td>Name1:</td>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td>Name2:</td>
    <td><input type="text"/></td>
  </tr>
  <tr>
    <td>Name3:</td>
    <td><input type="text"/></td>
  </tr>
  </table>
  </td>
</tr>
</table>
</body>
</html>

Notice how both the sub tables are top aligned, as well as the label for the
list box.
-- 
Quintin Beukes