I want to add a progress bar in j2me application that shows the busy process.
I am doing this using alert adding gauge as indicator but it disappears on button click.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
If you do not want to go with LCDUI Alert or LWUIT you can use Canvas. I have shared a very simple sample at http://smallandadaptive.blogspot.com.br/2009/09/adding-simple-progress-bar.html Full text below:
A progress bar is a visual representation of a Real Number between zero and one or a percentage between 0% and 100%.
Below is a method for drawing a simple progress bar:
/** * @param g Graphics * @param x * @param y * @param w width * @param h height * @param p part between zero and total * @param t total */ void fillProgressBar (Graphics g, int x, int y, int w, int h, int p, int t) { g.drawRect(x, y, w, h); // p will receive the pixel width of the proportion: part / total p = (p * w) / t; g.fillRect(x, y, p, h); }