Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

My constructor only runs once complete  RSS feed

 
Heg Lachher
Greenhorn
Posts: 28
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code:

So the construtor only runs once the while loop is complete.
I don't get the problem!
Please help! Thanks!
 
Heg Lachher
Greenhorn
Posts: 28
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heg Lachher wrote:Sorry please help delete this post i don't know how; i just figured the awnser out about an hour ago.

It actually still doesn't work, here is the new code:
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To start with, you should call the setVisible(true) at the end after you are done setting the size, title, adding children etc.

Any updates to the UI (JProgressBar in your case) should be called from the Event Dispatch Thread.
Check out this FAQ to find out the solution.
In general, you are recommended this reading http://docs.oracle.com/javase/tutorial/uiswing/concurrency/
 
Heg Lachher
Greenhorn
Posts: 28
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i get it now. So, there is a class called "task" i am trying to find because you can use it with the JProgressBar. But the problem is I can't find the package it is located in.
 
Heg Lachher
Greenhorn
Posts: 28
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i get it now, You have to have a button or something to trigger the JLoadingBar! Oh!
Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!