在 LWUIT 中,如何在单个表单上添加多个容器/布局?
在 J2ME 中我使用 LWUIT 库。
我的问题是我想使用不同的布局或容器在单个表单上添加各种组件。我正在寻找一些代码或示例。
示例..
- 在表单顶部添加标题图像。
- 添加两个标签,两个文本字段 一个容器/布局和两个按钮 在另一个容器/布局上。设计 就像登录表单一样。
- 在底部添加页脚图像 形式。
In J2ME I am Using LWUIT library.
My problem is I want to add various component on single Form using different layout or Container. I am looking for some code or example.
Example..
- add Header image on top of the Form.
- Adding two label, two textfield on
one Container/layout and Two button
on another Container/layout. Design
like Login Form. - add Footer image on bottom of the
Form.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
设置表单的标题图像以显示标题图像。设置表单的
softbutton
图像以显示页脚图像。通常,您可以对容器和表单使用边框布局或框布局。请参阅 LWUIT 存储库 上的 LWUITDemo 应用程序。它会对你有所帮助。另请参阅相同的示例:
轻量级用户界面工具包 (LWUIT):简介
使用 LWUIT 布局
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
使用具有不同布局的不同容器添加到表单中
,即将表单设置为
Borderlayout
将标题容器添加到北,将页脚容器添加到南接下来使用另一个具有所需布局的容器并将其添加到表单的中心,从而创建容器层次结构
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 southnext use another container with your required layout and add it to center in form, thus create container hierarchy
有关如何在各种布局中排列组件的示例,您可以查看 LWUIT 1.5 发行版和演示,例如其中包含布局演示的 LWUITDemo。请记住,布局可以嵌套。
我维护的 LWUIT 博客 包含大量布局使用示例。
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.