How to show two or more label at centre of the container in codenameone

前端 未结 2 1184
忘了有多久
忘了有多久 2021-01-06 23:18

I am new for Codenameone Is there any option to align a label depends on another label like align bottom, top, right and left option?

How to align many labels at the

2条回答
  •  星月不相逢
    2021-01-07 00:17

    These two approaches also serve to center labels inside a CN1 container:

    Container container01 = FlowLayout.encloseCenterMiddle();
    

    and

    Container container02 = new Container(new GridLayout(2,1));
    

    where the number 2 in GridLayout(2,1) refers to the number of labels you have for one column.

提交回复
热议问题