×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    2

    How can I do a wait form ?

    Hello,
    I'd like to display a form with a simple text as "Connecting..." during an internet connection so that the user doesn't panic.

    I tried using a Canvas and the paint method but nothing is displayed on my Nokia n70 before the paint method returns :

    Code:
    public class WaitForm extends Canvas implements CommandListener
    {
        private MyMIDlet midlet;
        private MainMenu mainmenu;
        private Command backCmd;
        
    	public WaitForm(MyMIDlet midlet, MainMenu mainmenu)
    	{        
            this.midlet = midlet;
            this.mainmenu = mainmenu;
    
            backCmd = new Command(mainmenu.langue.back, Command.STOP, 1);
            addCommand(backCmd);
            setCommandListener(this);
    	}
    
        public void commandAction(Command cmd, Displayable d)
        {
        	if( cmd == backCmd)
        		Display.getDisplay(midlet).setCurrent(mainmenu);	
        }
        
        protected void paint(Graphics g) 
        {
            g.drawString("Connecting...", 0, 0, Graphics.TOP|Graphics.LEFT);
            mainmenu.Connect();  // Take some times....
        }
    	
    }
    Do you have any idea on how to do that ? Is there an abstract method "OnShow" in the Form class ?

    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: How can I do a wait form ?

    Hi neyric! Welcome to Nokia Discussion Boards!!

    Regarding your doubt we had very recent discussion that Wang have pointed, So I suggest to please search through the previous postings, that will surely help you to find quick answers.

    Regards
    Gopal

Similar Threads

  1. second form not getting key events
    By krsunil in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-12-10, 10:29
  2. Cannot create form
    By Norrit_ in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-03-08, 15:21
  3. wait() and notify()
    By jhodgski in forum Mobile Java General
    Replies: 7
    Last Post: 2004-06-11, 09:40
  4. Form not displaying
    By Shabs in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-07-09, 16:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×