• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Threads, and the UI question.

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is something I am not understanding with this, so here goes.

First I am going to post the code which is in 3 classes. Then i'll ask the question at the bottom.

First OrderVod.java



then VodTask.java


then the SwingWorker.







Ok What I am trying to do is run a shell script and have the output of the script show up in realtime in the JTextArea. What I am not sure about is where my code should go that is performing that task. Here is that code.



The first 3 files are not completely my writings, I found code similar to what I am trying to do and changed it to how I wanted it. So what i need to figure out is when the run button is pushed i want this code above to run and the progress bar to tell the progress of it. Any help is much appreciated. Thanks, Sorry for the long post.
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it should go in the actionPerformed(...) method in OrderVod.java



i hope that helps.
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic