calling external os command via exec interupts windows that should be drawn
I'm calling the following ...
1.doc.insertString(doc.getLength(), string, doc.getStyle(t));
2.System.out.println(string);
3.Process p = Runtime.getRuntime().exec("/whatever.sh");
4.int i = p.waitFor();
5.if(i == 0) etc ....
the problem is that the #3 seems to be executing before steps #1 and #2 ... or at least the screen is not painted until #3 completes. Now I know I can do p.notify(); but then I don't get a return value from the os command I'm calling and I need it.
I hope someone can help me out with this, I'm still new to java programming.

