I am trying to build a really simple UI with CodeName One. I want a rectangular screen (to display image) and a button below it.
I can’t find anything like a panel for the rectangular screen, so I just put a label.
The hierarchy is shown below:
- Container (TableLayout, 3 rows and 1 column)
The components inside the container are: container:
- Label (row=0, column=0, vertical span = 2)
- Button (row=2,column=0, vertical span=1)
Since vertical span of Label is 2, should not it occupy two rows? However, its visible height is same as 1 row. What is wrong?
What is the equivalent for panel (to show images) in this API?
Is there a good tutorial for TableLayout managers?
I am familiar with JGoodies, can I use JGoodies with this API?
Gave an answer for this here
Pasting here for completeness:
That’s a really simple layout, you shouldn’t use table layout for this at all.
For the single column just set the parent to BorderLayout and place a Label for the white panel in the center and the button at the south.
For the two column layout you can again use border layout, in the center place a component with a two column/one row grid layout. Place two labels for the panels.
Do the same for the south by placing a Container with a two column grid layout and two buttons.