title: Display alert and then jump to another form in j2me
body: <p>I am working on J2ME application. I want to show alert in Form and display another Form from another class. I have tried the following method to show alert.</p>
  
  <pre><code>public void showMsg() 
      {
          Alert success = new Alert("Data Not found.");
          //success.setImage(img2);
         success.addCommand(new Command("Ok", Command.OK, 0));
         success.addCommand(new Command("Cancel", Command.CANCEL, 0));
         success.setCommandListener(this);
         success.setTimeout(Alert.FOREVER);
  
          Display.getDisplay(parent).setCurrent(success, chapterForm);
      } 
  </code></pre>
  
  <p>After showing the alert I am jumping to another form as:</p>
  
  <pre><code>Display.getDisplay(parent).setCurrent(welcomeForm);
  </code></pre>
  
  <p>When I run this it don't show the alert but jump to the welComeForm. So, how can I show alert and then jump to another form.</p>