
Originally Posted by
rajan701v
Is it possible to set the form to back in LWUIT.
Let i have Form1 and Form2.
Form1 switches to Form2 which has back Command. On the click of Back Command it will move to Form1 again.
Form1 has Labels and Textfields
Please Reply.
This is very basic thing that is required in most of the apps. You can set the form2 as the current displayable on the back command action inside the actionPerformed()
This is how you can move ahead,
PHP Code:
public void actionPerformed(ActionEvent ae) {
Form current = Display.getInstance().getCurrent();
if (current == mFirstForm) {
mSecondForm.show();
} else if (current == mSecondForm) {
mFirstForm.show();
}
}
In this code you can put the command events and change the displayable.