Skip to main content

Form - get back to previous form

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-12-12

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.
Joined: 2011-05-18

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

public class emailUpdateForm extends Form {

private Form backForm;

public emailUpdateForm(Form previousForm) // constructor



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();