Skip to main content

Form - get back to previous form

1 reply [Last post]
mark_comix
Offline
Joined: 2011-12-12
Points: 0

i'm working on my J2ME application trying to fix some bugs.

I have a form to change user's email address.

After the user types his email, he can select the first option on right button list to accept the change. I want to close the actual form and get back to previous form, but I can't. I don't know how to do it

I have to call the backbutton?

Any idea?.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
andrianiaina
Offline
Joined: 2011-05-18
Points: 0

Add a parameter to the email updating Form's constructor :

public class emailUpdateForm extends Form {

private Form backForm;

public emailUpdateForm(Form previousForm) // constructor

{

super();

backForm = previousForm;

}

So when you wanna go to the previous Form then you call : backForm.showBack();

NB : when you wanna show the email updating Form then call like this : ( new emailUpdateForm ( this ) ).show();