• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Real time progress bar

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anyone please help me?
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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%.
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Octavian Miu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, but if i want to display a screen that takes time, what then?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic