Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan

Comment Added by : Nick

Comment Added at : 2011-12-06 05:10:19

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
I have a question. So here I have a progress bar, but it seems to not move. I needed a way to wait sixty seconds before it added a number to the value, so I went to this. I have no idea how to use this, and thought I was using it correctly. The compiler seems to disagree. Here's my progress bar code:

//makes the progress bar
JProgressBar Bar = new JProgressBar(0, 15);
int a = 0;
while (a <15) {
a = a + 1;
Bar.setBounds(700, 75, 206, 40);
contentPane.add( Bar );

what i'm focusing on is the while loop. inside that, the compiler is complaining about the wait line. Apparently I am using this wrong. How do I use it right?

View Tutorial

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. great explanations.. some important words are miss
View Tutorial          By: Joshua Paul at 2015-04-14 03:43:44

2. Good tutorial.
View Tutorial          By: Pinky at 2010-03-11 10:42:49

3. How can I send parameter to crystal report?
View Tutorial          By: Mark at 2009-10-14 03:41:36

4. You should show how to implement a custom sorting
View Tutorial          By: AngleWyrm at 2012-12-13 19:35:30

5. It seems like your getConnection doesnt recognize
View Tutorial          By: Partha at 2009-11-28 11:32:53

6. hi guys,

i want some

View Tutorial          By: THANGA at 2012-03-19 15:24:38

7. how to write an byte array containing 10 different
View Tutorial          By: sanjana at 2015-01-17 06:32:41

8. Thanks a lot! This really helped!!!
View Tutorial          By: SuperSeppel13 at 2009-04-14 04:25:06

9. it was very useful to me
View Tutorial          By: balaji at 2012-01-09 22:50:25

10. really very good example .now i have cleared what
View Tutorial          By: pushpendra bansal gurjar at 2012-02-15 12:19:58