Solved

progressbar

Posted on 1998-08-17
1
165 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
1 Comment
 
LVL 3

Accepted Solution

by:
sailwind earned 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 84
what is a "java.lang.System Property"   ? 20 57
session migration servlets 2 24
configure dependency in POM for new database 3 13
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now