开发者

In LWUIT, how can i add multiple container/Layout on single Form?

开发者 https://www.devze.com 2023-03-16 22:11 出处:网络
In J2ME I am Using LWUIT library. My problem is I want to add various component on single Form us开发者_运维问答ing different layout or Container. I am looking for some code or example.

In J2ME I am Using LWUIT library.

My problem is I want to add various component on single Form us开发者_运维问答ing different layout or Container. I am looking for some code or example.

Example..

  1. add Header image on top of the Form.
  2. Adding two label, two textfield on one Container/layout and Two button on another Container/layout. Design like Login Form.
  3. add Footer image on bottom of the Form.


Set the title image of the form for showing header image. Set the softbutton image of the form for showing footer image.

Normally you can use the border layout or box layout for both container and form. See the LWUITDemo application on LWUIT repository. It will helps you. Also see the same sample examples,

The Lightweight User Interface Toolkit (LWUIT): An Introduction

Using LWUIT layouts


use different container with different layout to add in form

i.e set form to Borderlayout add title container to north and footer container to south

next use another container with your required layout and add it to center in form, thus create container hierarchy


For samples on how to arrange components in various layouts you can look within the LWUIT 1.5 distribution and on demos such as the LWUITDemo which has a layouts demo within it. Keep in mind that layouts can be nested.

The LWUIT blog which I maintain contains lots of samples of layout usage.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号