Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > waitFor suspends parent + siblings?

Reply
Thread Tools

waitFor suspends parent + siblings?

 
 
Rachel
Guest
Posts: n/a
 
      10-15-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
London Stock Exchange Suspends Migration To Linux. Boris Badenough Computer Support 1 11-08-2010 04:07 PM
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
waitFor and return (very strange) depo Java 11 05-17-2004 01:55 PM
Process waitFor command Matthew Zimmer Java 4 01-07-2004 03:07 PM
process.waitFor and readLine() blocks, help please! googlepost Java 0 07-21-2003 04:39 PM



Advertisments