Hopefully it is clear by now that TableLayout is easily ported to other toolkits. Anyone care to do SWT?
Update: Now has libgdx support. libgdx has a scene2d package and now TableLayout can be used to layout actors in your 2D scenes. Eg, this TableLayout definition:
debug
* spacing:10 size:50
'1' '2' '3'
---
'4' '5' '6'
---
'7' '8' '9'
---
'#' '0' '*'
Produces this:
http://screensnapr.com/e/OL0fiG.png
Debug causes the red and green borders to show up, so you can see the table (green) and edges of the actors (red). The asterisk sets some properties that apply to all cells. The single quoted values create a label. You could also put in a bunch of images, buttons, or any libgdx actor (write your own fancy one). Conveniently libgdx actors already have names, so you can just add actors to your scene, then reference the names in the TableLayout with square brakcets:
* spacing:10 size:50
[1] [2] [3]
---
[4] [5] [6]
---
[7] [8] [9]
---
[#] [0] [*]
One nice thing about using TableLayout with libgdx is that you can describe a table that has cells that expand, actors can fill any percentage of a cell, etc. This means you can have layouts that work on many different screen resolutions. Coding this manually can be tedious.
See the TableLayout homepage for many other features such as describing nested tables, setting bean properties, etc.