Adding Form to Tabs in LWUIT

95 Views Asked by At

Is it possible to add Form to Tabs Class in LWUIT ?? As per the API tabs contain method to add only component. If yes please provide a sample code how to add it..

Will it be like - new Tabs.addTab("Title", form.show()) or how it is ??

2

There are 2 best solutions below

0
On

Take a look on these posts. You can find here how to create tabs using Form. The Form class is a Componenttoo.

StackOverflow tab answer

Nokia developer tabs answer

6
On

You need to use a container for the entries, you can add your form to a tabPane and than add the tabPane to another form(this form is a container for the entries). do like this:

Tabs tabPane = new Tabs(); 
Form frm_Obj = new Form("Show this form");
Form frm1 = new Form("Add this form to tabPane");

tabPane.addTab("My Form",frm1);

frm_Obj.addComponent(tabPane);
frm_Obj.show();