waitFor suspends parent + siblings?

R

Rachel

Hi,

My application A (JFrame) spawns a thread B (JFrame implements runnable) in
its constructor. thread B has some checkboxes inside of it's JFrame content
pane.

public class A extends JFrame{

private tb B;

public A() {
...
B = new tb();
B.start();
}

public void run somejarfile{
....
p = r.exec(javaw somejarfile);
p.waitFor();
....
}
}

I understand that each time I execute the p.waitFor() api, my application A
will be suspended (i.e. it does not respond to my mouseclicks nor
keypresses). That's fine. But my thread B stop responding to the mouse
clicks and keypress too!! Is this supposed to be the way waitFor() works? I
mean, does waitFor suspends its parent + its sibling threads?

How do I make thread B continue to respond to my mouse events?!

Help!
-Rach
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top