Meaningless Drivel is fun!*
The moose likes Java Micro Edition and the fly likes Real time progress bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Real time progress bar" Watch "Real time progress bar" New topic
Author

Real time progress bar

Octavian Miu
Greenhorn

Joined: May 22, 2009
Posts: 8
hello! i m trying to make a real time progress bar, by that you guys must understood that i want the bar to load as the activity i am waiting for is loadign itself. Please help.
Octavian Miu
Greenhorn

Joined: May 22, 2009
Posts: 8
can anyone please help me?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

I don't thing the standard J2ME widget toolset includes a progress bar, although maybe a third-party package like Polish might.

If you don't have a progress control, you can always do it the old-fashioned way. Draw a rectangle to hold the bar, draw another rectangle to show percent complete, where the width of this inner rectangle is W*(pct/100), where W is the width of the outer rectangle, and "pct" is the (integral) percent figure, as in "50" for 50%.


Customer surveys are for companies who didn't pay proper attention to begin with.
Octavian Miu
Greenhorn

Joined: May 22, 2009
Posts: 8
thank you for the answer, but i ment to say another thing. i know how to do it regarding the graphic part. the problem is:
i have this midlet which is about 200kb and the user needs to wait a while until the midlet is loading so i lunch first this waiting screen with progress bar, the progres bar must represent the loading progress in real time, until my main screen is loaded. i want to represent the real progress, not a imaginary progress
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

First off, your application/MIDlet can't show a Gauge or other kind of progress bar while it is itself loading, it has to be already loaded and running for that.

For examples of the principles behind animation during long running tasks, see these two pages:
Networking, User Experience, and Threads
Using Threads in J2ME Applications


luck, db
There are no new questions, but there may be new answers.
Octavian Miu
Greenhorn

Joined: May 22, 2009
Posts: 8
ok, but if i want to display a screen that takes time, what then?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Real time progress bar