Search code examples
java-melwuit

LWUIT Tabs creation


i have created LWUIT Tabs and added my LWUIT List to the Tabs and Displayed,but my Problem is,when i add number of List items to the Tab,those list items are displayed ,but when i scroll up my List,my Tab will also gets scrolled,how to fix my tab position? Here my Code:

tabs=new Tabs(Component.BOTTOM);
        tabs.addTab("TopNews", myNewsList);       
        form1.addComponent(tabs);
        form1.show();

Solution

  • Use:

    form1.setScrollable(false);
    

    And ideally also:

    form1.setLayout(new BorderLayout());
    form1.addComponent(BorderLayout.CENTER, tabs);