File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes display child threads ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "display child threads !" Watch "display child threads !" New topic

display child threads !

magesh karnam

Joined: Sep 08, 2003
Posts: 14
I have doubt regarding the display of the child threads. i have a master thread which creates the child threads. i would like to display the child threads and like to start or stop the particular child threads. Its very urgent can anyone help me
Idly Vada
Ranch Hand

Joined: Sep 02, 2003
Posts: 135
I don't think there is a way to put parent child relationships between threads in java directly. How ever we can have parent child relationships between thread groups.
By default all threads created in a program belong to the thread group main. But we can create several thread groups. Associate threads to thread groups.And can make one thread group as parent of another.
We can get all threads in a thread group as :
threadGroup.enumerate(Thread [])
magesh karnam

Joined: Sep 08, 2003
Posts: 14

I got the solution and solved it. thanks for your reply. Anyway this was posted long back. Thanks everybody.

I agree. Here's the link:
subject: display child threads !
Similar Threads
Calling a child frame from a frame
Sleeping Threads
Thread Synchronization block
Communication between Child and Parent Window
about JFrame and JOptionPane