Search code examples
javajava-melwuit

How to create back button on JAVA ME, LWUIT


I have some problem with creating back button. Now in form there is list, I need create button which be on this form in the lower right corner, and when scrolling list, button remains in its place(the lower right corner). I was trying create container in for lower of the screen and do his invisible. But its not helped because list does not appear under container.


Solution

  • You need to use in Object Command.

    Command cmd = new Command(searchText) {
          public void actionPerformed(ActionEvent evt) {
               //TODO - implement back 
            }
        };
    

    and than adding him to Form

    f.addCommand(command);