1

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

I want to center align my text on the screen.

how can I go about it ? I am using LWUIT 1.4.

bharath
  • 14,283
  • 16
  • 57
  • 95
garima
  • 5,154
  • 11
  • 46
  • 77

1 Answers1

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.

bharath
  • 14,283
  • 16
  • 57
  • 95