Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6973595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:07:42+00:00 2026-05-27T17:07:42+00:00

The application is running , the user is making some TextField editing. Then a

  • 0

The application is running , the user is making some TextField editing. Then a call is received , so the MIDlet enters the paused state. When the conversation is finished then the application is restarted , the startApp() method of the MIDlet is called and the main Form of the application is shown !

So how to dismiss this default behaviour so that the last opened Form with all the modifications are kept ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:07:42+00:00Added an answer on May 27, 2026 at 5:07 pm

    I created a static Form in the MIDlet class :

    public static Form lastForm = null;
    

    Then I set it to the actual Form in every Form of my project :

    if (!myMidlet.lastCanvas.isEmpty())
        myMidlet.lastCanvas.clear();    
    myMidlet.lastForm = this;
    

    Then in the startApp() I wrote :

    public void startApp() {
            ...
            if (lastForm != null)
                lastForm.showBack();
            else
            {
                new MainForm(this).show();
            }
        }
    

    EDIT :

    For the canvas :

    In the MIDlet class :

    public static Hashtable lastCanvas = new Hashtable();
    

    In the canvas class ( constructor ) :

    if (myMidlet.lastForm != null)
        myMidlet.lastForm = null;
    
    if (!myMidlet.lastCanvas.isEmpty())
        myMidlet.lastCanvas.clear();
    
    myMidlet.lastCanvas.put(new String("Form"), this);
    

    And in the startApp() :

    public void startApp() {
            VKBImplementationFactory.init();
            Display.init(this);
            if (lastForm != null)
                lastForm.showBack();
            else if (!lastCanvas.isEmpty())
            {
                javax.microedition.lcdui.Display.getDisplay(this).setCurrent((Canvas)lastCanvas.get(new String("Form")));
            }
            else
                new MainForm(this).show();
        }
    

    I think this approach of using a HashTable will work even for any lcdui Form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If the user received a call during application running, how to automatically open the
I need to impersonate myself as a domain user in a ASP.NET application running
I'm running a web application that allows a user to log in. The user
I have an asp.net application that requires some editing of the machine.config file in
I was running some application performance monitoring on my ASP.NET 4.0 application (on Windows
I am making an application where I am using some base activities that I
I'm creating a Swing application that connects to a web server, running some servlets
How would I quit all running user applications using Applescript?
Can I run my mod_perl aplication as an ordinary user similar to running a
I have a rails application running on a Linux server. I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.