This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes JList with Thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "JList with Thread" Watch "JList with Thread" New topic
Author

JList with Thread

Kuba Jakub
Greenhorn

Joined: Jun 15, 2011
Posts: 1
Hi,

I try to code GUI with JList which will contain thread pool and four buttons, three buttons for launch new task and one button to cancel selected task.
For start I can define the number of running thread (newScheduledThreadPool())
The active thread should have different background color (in Jlist) compare to recumbent task.
Task1, Task2, Task3 should work with different peridoicaly(scheduleAtFixedRate())

Can you help me what shoud I use to click on button(1-3) and add new task to thread pool and how to cancel the task vi select in Jlist and clik button cancel?

What I have is:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JList with Thread
 
Similar Threads
How to divide File in Java
Opening a new window.
JList selection to int not working
requestFocus
how to run sample swing program