?
Solved

progressbar

Posted on 1998-08-17
1
Medium Priority
?
172 Views
Last Modified: 2010-03-30
I am using progress bars in my program, is there a way to label the progress bar with a scale (say  0 - 100)so the user can tell what the exact value is.
0
Comment
Question by:psteph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
sailwind earned 150 total points
ID: 1222004
Yes you could. This is not exactly a scale that goes across the entire bar,
but it shows the current percentage done in digits:

declare the progress bar as follows:

ProgressMonitor monitor = new ProgressMonitor(this, "Processing...","Started",0,100);

Then, for your running program, do a loop, and in the loop:

   int ticks = 0;
   for(each iterations) {
       ticks+= 10;
       monitor.setProgress(ticks);
       monitor.setNote(String.valueOf(ticks)+"%"); // displays percentage done.
   }

There, simple as that.
 

0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question