Jump to content

  • Log In with Google      Sign In   
  • Create Account


problem jprogress bar


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Landi20   Members   -  Reputation: 198

Like
0Likes
Like

Posted 20 August 2012 - 12:21 PM

i can´t put my jpogress bar working
when a run the app
this is the code
  public void iterate(){
	    int num=0;
	    this.jButton31.setVisible(false);
while (num < 9999)
{
   try
{
   Thread.sleep(100);
}
   catch (InterruptedException e)
{

}
  num += 100;
  pb.setValue(num);

}
this.jButton31.setVisible(true);
}


Sponsor:

#2 Olaf Van Schlacht   Members   -  Reputation: 696

Like
1Likes
Like

Posted 20 August 2012 - 02:04 PM

You should read something about how Swing works and the Event Dispatching Queue Thread.
You better take a look at Threading and the SwingWorker class.

In order to make it work you have to open a second thread which updates the Progressbar.

printf("Hello Signature");


#3 Malabyte   Members   -  Reputation: 587

Like
0Likes
Like

Posted 20 August 2012 - 09:04 PM

Just some general links about Java:

http://www.java-forums.org/forum.php
http://www.oracle.co...view/index.html
http://docs.oracle.c...ase/7/docs/api/

Take your time and got through all of these sources and you'll become a Java God in no-time Posted Image

Edited by DrMadolite, 20 August 2012 - 09:07 PM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS