waitFor suspends parent + siblings?

Discussion in 'Java' started by Rachel, Oct 15, 2003.

  1. Rachel

    Rachel Guest

    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
    Rachel, Oct 15, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nobody
    Replies:
    4
    Views:
    1,330
    nobody
    Feb 15, 2004
  2. Dimitre Novatchev
    Replies:
    2
    Views:
    445
    Dimitre Novatchev [MVP XML]
    Feb 15, 2004
  3. Ian Gibbs
    Replies:
    2
    Views:
    466
    Ian Gibbs
    May 23, 2004
  4. iliad
    Replies:
    4
    Views:
    1,933
    iliad
    Sep 25, 2005
  5. Clint
    Replies:
    2
    Views:
    319
    Clint
    May 5, 2006
Loading...

Share This Page