Search code examples
java-melwuitnokia

How to display a Form Screen on LWUIT Tabs?


I have list items on form, I have to display that form on tabs, when the user clicked on a tab.

How to add that form to tab, after form.show() or before?

I need to display first tab as default with Form Screen?


Solution

  • You can display form in Tabs. Form is also a component.

    Form frmObj = new Form("Tabs Example");
    Form frmOne = new Form("One");
    Form frmTwo = new Form("Two");
    
    Tabs tabObj = new Tabs();
    tabObj.addTab("Form One",frmOne);
    tabObj.addTab("Form Two",frmTwo );
    frmObj.addComponent(tabObj);
    frmObj.show();