سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top