1

mForm.addComponent(new Label("some text"));

我想在屏幕上居中对齐我的文本。

我该怎么办?我正在使用 LWUIT 1.4。

4

1 回答 1

4

use BorderLayout for this.

Form mForm = new Form();    
mForm.setLayout(new BorderLayout());    
mForm.addComponent(BorderLayout.CENTER, new Label("some text"));    

For more info see this example.

于 2011-01-18T07:37:07.690 回答