Ok folks, I'm trying create a window that shows the list of links as it grows from a running web crawler/parser.
Now, I don't want anything else to happen in my program until this is finished and the user clicks OK (after seeing complete list of links). I think the appropriate way to do this is to have the driver of my program create this window, which I think should be a modal jdialog. The jdialog should then tell the parser to begin and the parser will send back linkAdded() calls to the jdialog.
I'm not positive if this is even the right way to go about the flow of control, so other thoughts about that are welcome. Assuming my thoughts are reasonable, let me tell you my problem. I have the JDialog class written. So, I instantiate it in my driver, then call show() on it. Thought that if added the code I want to run in the show method after calling super.show() it would work, but because I want this to be modal, it seems to block after that. So, I guess my question is, how do I execute code after the show() is called when it is a modal dialog?
Thanks, Matt [ August 03, 2004: Message edited by: Matt Zollinhofer ]
Thanks for your help Craig, after taking a fews days off and looking at it again. I realized I was just overthinking it. I ended up just making it a JFrame, and making it implement Runnable. That way in my control program, I instantiate it, then tell it to run which the initiates the calculations/updates that it needs to. I also made my control program an actionlistener and passed it to the frame, so that it will react when I push the OK button.
Thanks again, Matt
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com