mForm.addComponent(new Label("some text"));
我想在屏幕上居中对齐我的文本。
我该怎么办?我正在使用 LWUIT 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.