Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Gui and Thread  RSS feed

 
Matthew Tilic
Ranch Hand
Posts: 41
Chrome Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a GUI which has a progress bar which is setInderterminate(true), and this is called from the base class. The base class also calls a thread which executes a process and waits for it to finish. The base class goes into a while loop untill the gui with the progress bar closes.

I believe this shouldn't happen. Here is what my code does





Thread




Gui class





Just to go over. THis is a smaller version of what my code does and their may be a few spelling errors and forgotten ";" however in the actual code they are all implemented. I can't understand why the gui just appears blank and wont appear

Thanks
 
Andrey Kozhanov
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
General approach to GUI creation: ANY task which might be time-consuming should be performed via javax.swing.SwingWorker.
 
Matthew Tilic
Ranch Hand
Posts: 41
Chrome Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have done that and Still somehow the gui hangs
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html
 
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

progressBar.setIndeterminate(true); Does this even compile for you?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!